Update coverage report gist #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nox-coverage | |
on: push | |
jobs: | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.13"] | |
steps: | |
- name: "Check out the repo" | |
uses: actions/checkout@v4 | |
- name: "Set up Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
architecture: x64 | |
- name: "Download coverage data" | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: coverage-data-* | |
merge-multiple: true | |
- name: "Combine coverage data" | |
run: | | |
export TOTAL=$(python -c "import json;print(json.load(open('htmlcov/coverage.json'))['totals']['percent_covered_display'])") | |
echo "total=$TOTAL" >> $GITHUB_ENV | |
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY | |
- name: "Make badge" | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.GIST_TOKEN }} | |
gistID: e1cbfcb69276c8b91e37a811b9fab725 | |
filename: xfce-repocapp_covbadge.json | |
label: Coverage | |
message: ${{ env.total }}% | |
minColorRange: 50 | |
maxColorRange: 90 | |
valColorRange: ${{ env.total }} |