From 59100e89daf39d4693176f97f9b047b5e2e36f7e Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 19 Sep 2023 13:20:08 -0400 Subject: [PATCH 01/15] use OpenAstronomy PyPI upload workflow --- .github/workflows/publish-to-pypi.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 8f96ce9d..fcbb9a01 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -2,15 +2,16 @@ name: Publish to PyPI on: release: - types: [released] + types: [ released ] jobs: publish: - uses: spacetelescope/action-publish_to_pypi/.github/workflows/workflow.yml@master + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 with: - test: false - build_platform_wheels: false # Set to true if your package contains a C extension + targets: | + - linux + - macos + sdist: true secrets: - user: ${{ secrets.PYPI_USERNAME_STSCI_MAINTAINER }} - password: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} # WARNING: Do not hardcode secret values here! If you want to use a different user or password, you can override this secret by creating one with the same name in your Github repository settings. - test_password: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER_TEST }} + pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} + From 89bcc891af01a2e9cbcc580c08c629201b2c593f Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 19 Sep 2023 13:24:08 -0400 Subject: [PATCH 02/15] use pure Python builder --- .github/workflows/publish-to-pypi.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index fcbb9a01..b30421bb 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -6,12 +6,7 @@ on: jobs: publish: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 - with: - targets: | - - linux - - macos - sdist: true + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 secrets: pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} From 44d71d08ab937ca8da9e975175ff767d10038320 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 19 Sep 2023 13:45:31 -0400 Subject: [PATCH 03/15] remove call of build-dist in favor of using publish action without publish --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f6a5be5..3ff7c95e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,6 @@ jobs: with: envs: | - linux: check-style - - linux: build-dist test: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: From e1491f9c1202377faeb8264df09c6837a57eab85 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Tue, 19 Sep 2023 13:46:12 -0400 Subject: [PATCH 04/15] Apply suggestions from code review Co-authored-by: William Jamieson --- .github/workflows/publish-to-pypi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index b30421bb..6a05e940 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -2,11 +2,13 @@ name: Publish to PyPI on: release: - types: [ released ] + types: [released, pull_request, workflow_dispatch] jobs: publish: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 + with: + upload_to_pypi: ${{ github.event_name == 'released'}} secrets: pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} From 90baea891348336f53a2961f941adb3900934010 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 19 Sep 2023 13:49:58 -0400 Subject: [PATCH 05/15] remove check block entirely in favor of pre-commit --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ff7c95e..11aa4d05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,6 @@ concurrency: cancel-in-progress: true jobs: - check: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 - with: - envs: | - - linux: check-style test: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: From bc32b361b76437d08c2e2c8c317e678f1df61c7c Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 19 Sep 2023 13:54:42 -0400 Subject: [PATCH 06/15] fix workflow triggers --- .github/workflows/publish-to-pypi.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 6a05e940..c9ffcec9 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -2,7 +2,9 @@ name: Publish to PyPI on: release: - types: [released, pull_request, workflow_dispatch] + types: [ released ] + pull_request: + workflow_dispatch: jobs: publish: @@ -11,4 +13,3 @@ jobs: upload_to_pypi: ${{ github.event_name == 'released'}} secrets: pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} - From 9bfc89d4020e911571728240f8a0344a8261c295 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 19 Sep 2023 13:55:07 -0400 Subject: [PATCH 07/15] rename workflows --- .github/workflows/ci.yml | 4 ++-- .github/workflows/ci_cron.yml | 3 +-- .github/workflows/publish-to-pypi.yml | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11aa4d05..c275c30a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: test on: push: @@ -35,7 +35,7 @@ jobs: - linux: test-cov-xdist coverage: 'codecov' test_downstream: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: setenv: | CRDS_PATH: ${{ needs.crds.outputs.path }} diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index ee63d5a4..79ff1cd0 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -1,5 +1,4 @@ - -name: Weekly cron +name: test on schedule on: schedule: diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index c9ffcec9..10eaac6c 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,4 +1,4 @@ -name: Publish to PyPI +name: build on: release: @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - publish: + build: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: upload_to_pypi: ${{ github.event_name == 'released'}} From 8b892f402e3d66e87385b43dc5a426a1f34cafb8 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 19 Sep 2023 14:10:08 -0400 Subject: [PATCH 08/15] simplify changelog workflow --- .github/workflows/changelog.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 66b7e7c1..cadc14fb 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,24 +1,18 @@ -name: Changelog +name: confirm changelog entry on: pull_request: types: [labeled, unlabeled, opened, synchronize, reopened] -# Only cancel in-progress jobs or runs for the current workflow -# This cancels the already triggered workflows for a specific PR without canceling -# other instances of this workflow (other PRs, scheduled triggers, etc) when something -# within that PR re-triggers this CI concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - changelog: - name: Confirm changelog entry + check: runs-on: ubuntu-latest steps: - - name: Check change log entry - uses: scientific-python/action-check-changelogfile@6087eddce1d684b0132be651a4dad97699513113 # 0.2 + - uses: scientific-python/action-check-changelogfile@0.2 env: CHANGELOG_FILENAME: CHANGES.rst CHECK_MILESTONE: false From 0ab3c420d58b7d4cfc1b7c5be076c52a8981d062 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Wed, 20 Sep 2023 09:24:14 -0400 Subject: [PATCH 09/15] rename workflow files --- .github/workflows/{publish-to-pypi.yml => build.yml} | 0 .github/workflows/{changelog.yml => confirm_changelog_entry.yml} | 0 .github/workflows/{ci.yml => test.yml} | 0 .github/workflows/{ci_cron.yml => test_on_schedule.yml} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{publish-to-pypi.yml => build.yml} (100%) rename .github/workflows/{changelog.yml => confirm_changelog_entry.yml} (100%) rename .github/workflows/{ci.yml => test.yml} (100%) rename .github/workflows/{ci_cron.yml => test_on_schedule.yml} (100%) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/publish-to-pypi.yml rename to .github/workflows/build.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/confirm_changelog_entry.yml similarity index 100% rename from .github/workflows/changelog.yml rename to .github/workflows/confirm_changelog_entry.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/test_on_schedule.yml similarity index 100% rename from .github/workflows/ci_cron.yml rename to .github/workflows/test_on_schedule.yml From 1a27c0b1581730dd496f43f54acb8299eb4cc6d8 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Wed, 20 Sep 2023 09:28:58 -0400 Subject: [PATCH 10/15] update triggers and list syntax --- .github/workflows/test_on_schedule.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_on_schedule.yml b/.github/workflows/test_on_schedule.yml index 79ff1cd0..0506d2a0 100644 --- a/.github/workflows/test_on_schedule.yml +++ b/.github/workflows/test_on_schedule.yml @@ -8,10 +8,14 @@ on: # We also want this workflow triggered if the `Weekly CI` label is # added or present when PR is updated types: - - synchronize + - opened + - reopened - labeled + - unlabeled + - synchronize push: - tags: "*" + tags: + - "*" workflow_dispatch: jobs: From 6a92c63b55d237b5940110dbe2b58bea7ca0f216 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Wed, 20 Sep 2023 09:33:12 -0400 Subject: [PATCH 11/15] rename workflow files based on feedback --- .github/workflows/{build.yml => build_wheels.yml} | 0 .github/workflows/{confirm_changelog_entry.yml => changelog.yml} | 0 .github/workflows/{test.yml => ci.yml} | 0 .github/workflows/{test_on_schedule.yml => ci_cron.yml} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yml => build_wheels.yml} (100%) rename .github/workflows/{confirm_changelog_entry.yml => changelog.yml} (100%) rename .github/workflows/{test.yml => ci.yml} (100%) rename .github/workflows/{test_on_schedule.yml => ci_cron.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build_wheels.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build_wheels.yml diff --git a/.github/workflows/confirm_changelog_entry.yml b/.github/workflows/changelog.yml similarity index 100% rename from .github/workflows/confirm_changelog_entry.yml rename to .github/workflows/changelog.yml diff --git a/.github/workflows/test.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/test.yml rename to .github/workflows/ci.yml diff --git a/.github/workflows/test_on_schedule.yml b/.github/workflows/ci_cron.yml similarity index 100% rename from .github/workflows/test_on_schedule.yml rename to .github/workflows/ci_cron.yml From 6c837e7ad2fd8688b80a03e9e228c61687dc9da5 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Wed, 20 Sep 2023 09:36:17 -0400 Subject: [PATCH 12/15] rename workflows --- .github/workflows/build_wheels.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/ci_cron.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 10eaac6c..ab23ae14 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,4 +1,4 @@ -name: build +name: Build Wheels on: release: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c275c30a..f488e84a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: test +name: CI on: push: diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index 0506d2a0..93bae788 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -1,4 +1,4 @@ -name: test on schedule +name: Weekly CI on: schedule: From 05cfeedb369421b6d2410985858deadc650ea643 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Wed, 20 Sep 2023 09:49:20 -0400 Subject: [PATCH 13/15] rename toxenvs to be more explanatory --- .github/workflows/ci.yml | 15 ++++----------- .github/workflows/ci_cron.yml | 10 +++++----- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f488e84a..c871d446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,17 +22,10 @@ jobs: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: envs: | - - linux: test-oldestdeps-cov-xdist - python-version: 3.9 - - linux: test-xdist - python-version: '3.9' - - linux: test-xdist - python-version: '3.10' - - linux: test-xdist - python-version: '3.11' - - macos: test-xdist - python-version: '3.11' - - linux: test-cov-xdist + - linux: py39-oldestdeps-cov-xdist + - linux: py310-xdist + - macos: py311-xdist + - linux: py311-cov-xdist coverage: 'codecov' test_downstream: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index 93bae788..08ba3f68 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -24,8 +24,8 @@ jobs: if: (github.repository == 'spacetelescope/stpipe' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI'))) with: envs: | - - macos: test-xdist - python-version: 3.9 - - macos: test-xdist - python-version: 3.10 - - linux: test-devdeps-xdist + - macos: py39-xdist + - macos: py310-xdist + - windows: py311-xdist + - linux: py3-devdeps-xdist + - macos: py3-devdeps-xdist From 3531c67e2f55dc44858ed48b10e4f58b59de7d68 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 25 Sep 2023 11:54:16 -0400 Subject: [PATCH 14/15] fix upload event filter --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index ab23ae14..91fab9e6 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -10,6 +10,6 @@ jobs: build: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: - upload_to_pypi: ${{ github.event_name == 'released'}} + upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }} secrets: pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} From de1a50d9945aa9a0b3c8087ee995040487bf94b6 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 2 Oct 2023 10:57:32 -0400 Subject: [PATCH 15/15] concise naming --- .github/workflows/{build_wheels.yml => build.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{build_wheels.yml => build.yml} (95%) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build.yml similarity index 95% rename from .github/workflows/build_wheels.yml rename to .github/workflows/build.yml index 91fab9e6..12215c1f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Wheels +name: build on: release: