Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

coverage-compile:
name: "coverage compile"
needs: "run-tests-and-coverage"
needs: ["settings", "run-tests-and-coverage"]
runs-on: "ubuntu-latest"
steps:
- name: "Repo checkout"
Expand All @@ -104,11 +104,16 @@ jobs:
- name: "Compile coverage data"
run: "uvx nox --session combine"

- name: "Post summary to step summary."
- name: "Post summary to step summary"
run: |
export COVERAGE_REQUIRED=$(<.required-coverage)
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
echo "TOTAL=$TOTAL" >> $GITHUB_ENV
echo "### Minimum coverage required: ${COVERAGE_REQUIRED}%" >> $GITHUB_STEP_SUMMARY
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
if [ ${COVERAGE_REQUIRED} -gt $TOTAL ]; then
exit 1
fi

linters-and-formatters:
name: "linters and formatters"
Expand Down
1 change: 1 addition & 0 deletions .required-coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
100