5
5
6
6
jobs :
7
7
base_coverage :
8
+ continue-on-error : true
8
9
runs-on : ubuntu-latest
9
10
steps :
10
11
- uses : actions/checkout@v3
@@ -111,11 +112,16 @@ jobs:
111
112
name : coverage-3.12
112
113
113
114
- name : Download code coverage report for base branch
115
+ id : download-base-coverage
116
+ continue-on-error : true
114
117
uses : actions/download-artifact@v4
115
118
with :
116
119
name : base-coverage.lcov
117
120
118
121
- name : Generate Code Coverage report
122
+ # Note, due to continue on error (to make job pass) we need to check the
123
+ # Status of the step directly not just use success() or failure()
124
+ if : steps.download-base-coverage.outcome == 'success'
119
125
id : code-coverage
120
126
uses : barecheck/code-coverage-action@v1
121
127
with :
@@ -124,4 +130,15 @@ jobs:
124
130
base-lcov-file : " ./base-coverage.lcov"
125
131
minimum-ratio : 0
126
132
send-summary-comment : true
127
- show-annotations : " warning"
133
+ show-annotations : " warning"
134
+
135
+ - name : Generate Code Coverage report if base job fails
136
+ if : steps.download-base-coverage.outcome == 'failure'
137
+ id : code-coverage-without-base
138
+ uses : barecheck/code-coverage-action@v1
139
+ with :
140
+ barecheck-github-app-token : ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
141
+ lcov-file : " ./coverage.lcov"
142
+ minimum-ratio : 0
143
+ send-summary-comment : true
144
+ show-annotations : " warning"
0 commit comments