From fefbfd3161acf9620d7f19932a905c210d2a8301 Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Mon, 19 Feb 2024 15:55:45 +0100 Subject: [PATCH] Run mutation test workflow on release-* branches But still update the badge and previous result only on the main branch. --- .github/workflows/coverage.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e2bbe639e..fbdaee05c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,7 +3,9 @@ name: Test coverage on: push: - branches: [main] + branches: + - main + - 'release-*' jobs: test: @@ -45,6 +47,7 @@ jobs: sed "s/{shortcommit}/${GITHUB_SHA:0:8}/g;s/{commit}/${GITHUB_SHA}/g;s#{repo}#${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}#g" .github/workflows/coverage/index.html.template > build/gh-pages/index.html - name: Create coverage badge + if: ${{ github.ref == 'refs/heads/main' }} # This creates a file that defines a [Shields.io endpoint badge](https://shields.io/endpoint) # which we can then include in the project README. uses: ./.github/actions/pit-results-badge @@ -69,6 +72,7 @@ jobs: prev-mutations-file: prev-mutations.xml - name: Push to GitHub Pages + if: ${{ github.ref == 'refs/heads/main' }} run: | git config user.name github-actions git config user.email github-actions@github.com