From 493095b7f49e379d8741bd4a2e363ae0d36402b7 Mon Sep 17 00:00:00 2001 From: Lukas Atkinson Date: Tue, 28 Dec 2021 22:50:22 +0100 Subject: [PATCH] Run release-checklist only in the "deploy" GH Workflow The release checklist was previously executed as part of the "deploy" and "test" workflow. In the test configuration, it would demote certain errors to warnings. However, pull requests run both the test and deploy workflows. Thus, problems that should only be treated as warnings still caused CI to fail. The solution was to perform the checks only as part of the "deploy" workflow, and to configure it to demote errors when not actually doing a release. --- .github/workflows/deploy.yml | 6 +++++- .github/workflows/test.yml | 17 ++--------------- admin/release_checklist | 5 +---- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 46107b0a1..66bb81985 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,9 +17,13 @@ jobs: steps: - uses: actions/checkout@v2 + - name: For a dry run, don't verify tags and documentation + if: ${{ ! startsWith(github.event.ref, 'refs/tags/') }} + run: | + echo EXTRA_CHECKLIST_ARGS="--no-verify-tags --no-verify-docs-next-version" >> $GITHUB_ENV - name: Run release_checklist run: | - admin/release_checklist 5.0 + admin/release_checklist $EXTRA_CHECKLIST_ARGS 5.0 deploy: runs-on: ubuntu-18.04 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33087fc12..256668e70 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,23 +64,10 @@ jobs: fi exit 0 - release-check: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - name: Setup environment - run: | - echo "GITHUB_PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV - shell: bash - - name: Run release_checklist - run: | - admin/release_checklist --no-verify-tags --no-verify-docs-next-version 5.0 - build: runs-on: ${{ matrix.os }} - needs: [milestone-check, changelog-check, release-check] + needs: [milestone-check, changelog-check] strategy: fail-fast: false @@ -162,7 +149,7 @@ jobs: run-docker: runs-on: ubuntu-18.04 - needs: [milestone-check, changelog-check, release-check] + needs: [milestone-check, changelog-check] strategy: fail-fast: false diff --git a/admin/release_checklist b/admin/release_checklist index 029951937..71679f5c6 100755 --- a/admin/release_checklist +++ b/admin/release_checklist @@ -79,10 +79,7 @@ grep -qE "version=['\"]gcovr $target_version['\"]" doc/examples/example_xml.xml || error "examples: Please regenerate: " \ "cd doc/examples; ./example_xml.sh > example_xml.xml" -grep -qE "^ *$0 --no-verify-tags --no-verify-docs-next-version $target_version\$" .github/workflows/test.yml \ - || error ".github/workflows/test.yml: Please update the $0 version" - -grep -qE "^ *$0 $target_version\$" .github/workflows/deploy.yml \ +grep -qE "^ *$0 .EXTRA_CHECKLIST_ARGS $target_version\$" .github/workflows/deploy.yml \ || error ".github/workflows/deploy.yml: Please update the $0 version" occurrences="$(