File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 7777
7878 coverage-compile :
7979 name : " coverage compile"
80- needs : " run-tests-and-coverage"
80+ needs : ["settings", " run-tests-and-coverage"]
8181 runs-on : " ubuntu-latest"
8282 steps :
8383 - name : " Repo checkout"
@@ -104,11 +104,16 @@ jobs:
104104 - name : " Compile coverage data"
105105 run : " uvx nox --session combine"
106106
107- - name : " Post summary to step summary. "
107+ - name : " Post summary to step summary"
108108 run : |
109+ export COVERAGE_REQUIRED=$(<.required-coverage)
109110 export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
110111 echo "TOTAL=$TOTAL" >> $GITHUB_ENV
112+ echo "### Minimum coverage required: ${COVERAGE_REQUIRED}%" >> $GITHUB_STEP_SUMMARY
111113 echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
114+ if [ ${COVERAGE_REQUIRED} -gt $TOTAL ]; then
115+ exit 1
116+ fi
112117
113118 linters-and-formatters :
114119 name : " linters and formatters"
Original file line number Diff line number Diff line change 1+ 100
You can’t perform that action at this time.
0 commit comments