Skip to content

Commit

Permalink
ci: fix main coverage badge generation
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed May 15, 2024
1 parent 7ddb8b0 commit 4a50a73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
if git show ${{ inputs.coverage-branch }}:${{ inputs.coverage-report }} > /tmp/main-coverage.txt; then
coverage report --skip-covered --skip-empty --show-missing --format=diff --base-coverage-report=/tmp/main-coverage.txt --base-revision=${{ inputs.base-branch }} --fail-under=base >> /tmp/report.md || status=$?
else
coverage report --skip-covered --skip-empty --show-missing --format=diff --base-revision=main >> /tmp/report.md || status=$?
coverage report --skip-covered --skip-empty --show-missing --format=diff --base-revision=${{ inputs.base-branch }} >> /tmp/report.md || status=$?
fi
cat /tmp/report.md >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -119,12 +119,13 @@ jobs:
- uses: actions/checkout@v4
with:
repository: aphp/foldedtensor
sparse-checkout-cone-mode: false
sparse-checkout: |
.github/workflows/generate_badge.py
- name: Combine coverage and generate the report and the badge
run: |
python -Im pip install --upgrade "git+https://github.com/percevalw/coveragepy.git[toml]"
python -Im pip install --upgrade "git+https://github.com/percevalw/coveragepy.git#egg=coverage[toml]"
python -Im coverage combine
coverage report --show-missing > /tmp/main-coverage.txt
Expand Down

0 comments on commit 4a50a73

Please sign in to comment.