From 12f9c88039198fc179ac51907f57803ee72a2abb Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Tue, 22 Aug 2023 10:20:02 -0400 Subject: [PATCH 1/2] Fix issue with tox 4.9 --- .github/workflows/ci.yml | 1 + .github/workflows/ci_cron.yml | 9 +++++++++ tox.ini | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c78d31bf..4f6a5be5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ on: # Weekly Monday 9AM build # * is a special character in YAML so you have to quote this string - cron: '0 9 * * 1' + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index 9fe0aa85..ee63d5a4 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -5,11 +5,20 @@ on: schedule: # Weekly Monday 6AM build - cron: "0 0 * * 1" + pull_request: + # We also want this workflow triggered if the `Weekly CI` label is + # added or present when PR is updated + types: + - synchronize + - labeled + push: + tags: "*" workflow_dispatch: jobs: test: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 + 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 diff --git a/tox.ini b/tox.ini index 9057c270..93791247 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = check-{style,security,build} - test{,-warnings,-cov}-xdist + test{,-warnings,-cov,-xdist,-oldestdeps,-devdeps} test-numpy{120,121,122} test-{jwst,romancal}-xdist build-{docs,dist} From 20313ac5cfcf4155d1c7c4c97eb784aae96dc713 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Tue, 22 Aug 2023 10:23:46 -0400 Subject: [PATCH 2/2] Update changelog CI --- .github/workflows/changelog.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ebedec18..66b7e7c1 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,16 +1,25 @@ -name: Ensure changelog +name: Changelog 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: - ensure_changelog: - name: Verify that a changelog entry exists for this pull request + changelog: + name: Confirm changelog entry runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - submodules: true - - run: grep -P '\[[^\]]*#${{github.event.number}}[,\]]' CHANGES.rst - if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }} + - name: Check change log entry + uses: scientific-python/action-check-changelogfile@6087eddce1d684b0132be651a4dad97699513113 # 0.2 + env: + CHANGELOG_FILENAME: CHANGES.rst + CHECK_MILESTONE: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}