Skip to content

Commit fefbfd3

Browse files
committed
Run mutation test workflow on release-* branches
But still update the badge and previous result only on the main branch.
1 parent ca9b2f6 commit fefbfd3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/coverage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Test coverage
33

44
on:
55
push:
6-
branches: [main]
6+
branches:
7+
- main
8+
- 'release-*'
79

810
jobs:
911
test:
@@ -45,6 +47,7 @@ jobs:
4547
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
4648
4749
- name: Create coverage badge
50+
if: ${{ github.ref == 'refs/heads/main' }}
4851
# This creates a file that defines a [Shields.io endpoint badge](https://shields.io/endpoint)
4952
# which we can then include in the project README.
5053
uses: ./.github/actions/pit-results-badge
@@ -69,6 +72,7 @@ jobs:
6972
prev-mutations-file: prev-mutations.xml
7073

7174
- name: Push to GitHub Pages
75+
if: ${{ github.ref == 'refs/heads/main' }}
7276
run: |
7377
git config user.name github-actions
7478
git config user.email [email protected]

0 commit comments

Comments
 (0)