File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -244,8 +244,15 @@ jobs:
244244 body: output
245245 })
246246
247+ - name : Calculate minimum required coverage with tolerance
248+ run : |
249+ STMT_COVERAGE=${{ steps.set-stmts-coverage.outputs.STMTS_COVERAGE }}
250+ THRESHOLD_DELTA=${{ vars.COVERAGE_THRESHOLD_DELTA }}
251+ MIN_REQUIRED=$(echo "$STMT_COVERAGE + $THRESHOLD_DELTA" | bc)
252+ echo "MIN_REQUIRED_COVERAGE=$MIN_REQUIRED" >> $GITHUB_ENV
253+
247254 - name : Fail PR if current code coverage percentage is higher than the new one
248- if : ${{ (fromJson(steps.set-stmts-coverage.outputs.STMTS_COVERAGE ) < fromJson(steps.set-current-coverage.outputs.CURRENT_COVERAGE)) && (vars.CODE_COVERAGE_ENFORCEMENT == 'true') }}
255+ if : ${{ (fromJson(env.MIN_REQUIRED_COVERAGE ) < fromJson(steps.set-current-coverage.outputs.CURRENT_COVERAGE)) && (vars.CODE_COVERAGE_ENFORCEMENT == 'true') }}
249256 run : exit 1
250257
251258 - name : Update service code coverage percentage in Port
You can’t perform that action at this time.
0 commit comments