Skip to content

Commit 579003c

Browse files
Allow base_coverage job to fail
If there is a problem on master then base_coverage will never pass meaning that coverage will never be run.
1 parent bc19385 commit 579003c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
base_coverage:
8+
continue-on-error: true
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v3
@@ -111,11 +112,13 @@ jobs:
111112
name: coverage-3.12
112113

113114
- name: Download code coverage report for base branch
115+
continue-on-error: true
114116
uses: actions/download-artifact@v4
115117
with:
116118
name: base-coverage.lcov
117119

118120
- name: Generate Code Coverage report
121+
if: success()
119122
id: code-coverage
120123
uses: barecheck/code-coverage-action@v1
121124
with:
@@ -124,4 +127,15 @@ jobs:
124127
base-lcov-file: "./base-coverage.lcov"
125128
minimum-ratio: 0
126129
send-summary-comment: true
127-
show-annotations: "warning"
130+
show-annotations: "warning"
131+
132+
- name: Generate Code Coverage report if base job fails
133+
if: failure()
134+
id: code-coverage-without-base
135+
uses: barecheck/code-coverage-action@v1
136+
with:
137+
barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
138+
lcov-file: "./coverage.lcov"
139+
minimum-ratio: 0
140+
send-summary-comment: true
141+
show-annotations: "warning"

0 commit comments

Comments
 (0)