From 75024bc47a373e5ff02afd62c708ef74fc74d217 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:23:50 +0200 Subject: [PATCH] ENH: switch to ComPWA/actions@v2 (#430) * FIX: make `additional-extras` space-separated --- .github/workflows/cd.yml | 4 ++-- .github/workflows/ci.yml | 8 ++++---- .github/workflows/clean-caches.yml | 2 +- .github/workflows/pr-linting.yml | 2 +- src/compwa_policy/.github/workflows/cd.yml | 8 ++++---- src/compwa_policy/.github/workflows/ci.yml | 6 +++--- src/compwa_policy/.github/workflows/requirements.yml | 2 +- src/compwa_policy/check_dev_files/github_workflows.py | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 678aa9bb..bd8afb81 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,8 +9,8 @@ on: jobs: milestone: if: startsWith(github.ref, 'refs/tags') - uses: ComPWA/actions/.github/workflows/close-milestone.yml@v1 + uses: ComPWA/actions/.github/workflows/close-milestone.yml@v2 push: if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease secrets: inherit - uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v1 + uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fa0fc05..8feda57c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: >- + cancel-in-progress: |- ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} env: @@ -28,7 +28,7 @@ on: jobs: doc: - uses: ComPWA/actions/.github/workflows/ci-docs.yml@v1 + uses: ComPWA/actions/.github/workflows/ci-docs.yml@v2 permissions: pages: write id-token: write @@ -36,7 +36,7 @@ jobs: gh-pages: true specific-pip-packages: ${{ inputs.specific-pip-packages }} pytest: - uses: ComPWA/actions/.github/workflows/pytest.yml@v1 + uses: ComPWA/actions/.github/workflows/pytest.yml@v2 with: coverage-target: compwa_policy macos-python-version: "3.9" @@ -45,4 +45,4 @@ jobs: if: inputs.specific-pip-packages == '' secrets: token: ${{ secrets.PAT }} - uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1 + uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2 diff --git a/.github/workflows/clean-caches.yml b/.github/workflows/clean-caches.yml index 939e1361..7986e0cf 100644 --- a/.github/workflows/clean-caches.yml +++ b/.github/workflows/clean-caches.yml @@ -16,7 +16,7 @@ jobs: name: Remove caches runs-on: ubuntu-24.04 steps: - - uses: ComPWA/actions/clean-caches@v1 + - uses: ComPWA/actions/clean-caches@v2 with: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ref: ${{ inputs.ref }} diff --git a/.github/workflows/pr-linting.yml b/.github/workflows/pr-linting.yml index 0fab8410..44dc9e42 100644 --- a/.github/workflows/pr-linting.yml +++ b/.github/workflows/pr-linting.yml @@ -11,4 +11,4 @@ on: jobs: lint-pr: - uses: ComPWA/actions/.github/workflows/pr-linting.yml@v1 + uses: ComPWA/actions/.github/workflows/pr-linting.yml@v2 diff --git a/src/compwa_policy/.github/workflows/cd.yml b/src/compwa_policy/.github/workflows/cd.yml index 2f66c9ab..cf34984b 100644 --- a/src/compwa_policy/.github/workflows/cd.yml +++ b/src/compwa_policy/.github/workflows/cd.yml @@ -9,9 +9,9 @@ on: jobs: milestone: if: startsWith(github.ref, 'refs/tags') - uses: ComPWA/actions/.github/workflows/close-milestone.yml@v1 + uses: ComPWA/actions/.github/workflows/close-milestone.yml@v2 package-name: - uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@v1 + uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@v2 pypi: environment: name: PyPI @@ -24,9 +24,9 @@ jobs: id-token: write runs-on: ubuntu-24.04 steps: - - uses: ComPWA/actions/build-pypi-distribution@v1 + - uses: ComPWA/actions/build-pypi-distribution@v2 - uses: pypa/gh-action-pypi-publish@release/v1 push: if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease secrets: inherit - uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v1 + uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v2 diff --git a/src/compwa_policy/.github/workflows/ci.yml b/src/compwa_policy/.github/workflows/ci.yml index 016e4fa5..ae13957f 100644 --- a/src/compwa_policy/.github/workflows/ci.yml +++ b/src/compwa_policy/.github/workflows/ci.yml @@ -28,18 +28,18 @@ on: jobs: doc: - uses: ComPWA/actions/.github/workflows/ci-docs.yml@v1 + uses: ComPWA/actions/.github/workflows/ci-docs.yml@v2 permissions: pages: write id-token: write with: specific-pip-packages: ${{ inputs.specific-pip-packages }} pytest: - uses: ComPWA/actions/.github/workflows/pytest.yml@v1 + uses: ComPWA/actions/.github/workflows/pytest.yml@v2 with: specific-pip-packages: ${{ inputs.specific-pip-packages }} style: if: inputs.specific-pip-packages == '' secrets: token: ${{ secrets.PAT }} - uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1 + uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2 diff --git a/src/compwa_policy/.github/workflows/requirements.yml b/src/compwa_policy/.github/workflows/requirements.yml index ec42f28d..6202bdb5 100644 --- a/src/compwa_policy/.github/workflows/requirements.yml +++ b/src/compwa_policy/.github/workflows/requirements.yml @@ -19,6 +19,6 @@ on: jobs: requirements: - uses: ComPWA/actions/.github/workflows/requirements.yml@v1 + uses: ComPWA/actions/.github/workflows/lock.yml@v2 secrets: token: ${{ secrets.PAT }} diff --git a/src/compwa_policy/check_dev_files/github_workflows.py b/src/compwa_policy/check_dev_files/github_workflows.py index 7a45bff3..845e4f3b 100644 --- a/src/compwa_policy/check_dev_files/github_workflows.py +++ b/src/compwa_policy/check_dev_files/github_workflows.py @@ -226,7 +226,7 @@ def __update_pytest_section( else: with_section = config["jobs"]["pytest"]["with"] if test_extras: - with_section["additional-extras"] = ",".join(test_extras) + with_section["additional-extras"] = " ".join(test_extras) if CONFIG_PATH.codecov.exists(): with_section["coverage-target"] = __get_package_name() if not no_macos: