Skip to content

Commit

Permalink
Run release-checklist only in the "deploy" GH Workflow
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
latk committed Dec 28, 2021
1 parent 63614fa commit 493095b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Expand Up @@ -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
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/test.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions admin/release_checklist
Expand Up @@ -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="$(
Expand Down

0 comments on commit 493095b

Please sign in to comment.