Skip to content

Commit

Permalink
ci: fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw authored May 21, 2024
1 parent 3170ba5 commit d7f0fb3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,18 @@ jobs:
python -Im pip install --upgrade "git+https://github.com/percevalw/coveragepy.git#egg=coverage[toml]"
python -Im coverage combine
coverage report --show-missing > ${{ inputs.coverage-report }}
mv ${{ inputs.coverage-report }} /tmp/coverage.txt
# Generate the coverage badge
curl -s -o generate_badge.py https://raw.githubusercontent.com/aphp/foldedtensor/main/.github/workflows/generate_badge.py
python generate_badge.py -r /tmp/main-coverage.txt -t ${{ inputs.badge-template.svg }} > ${{ inputs.coverage-badge }}
mv ${{ inputs.coverage-badge }} /tmp/coverage.svg
git add ${{ inputs.coverage-report }} ${{ inputs.coverage-badge }}
git stash
git fetch origin ${{ inputs.coverage-branch }}:${{ inputs.coverage-branch }} --depth=1 || true
git checkout ${{ inputs.coverage-branch }} || git checkout --orphan ${{ inputs.coverage-branch }}
git reset --hard
git stash pop
ls -lah
cat /tmp/coverage.txt
cat /tmp/coverage.svg
cp /tmp/coverage.txt ${{ inputs.coverage-report }}
cp /tmp/coverage.svg ${{ inputs.coverage-badge }}
git add ${{ inputs.coverage-report }} ${{ inputs.coverage-badge }}
git commit -m "Update main coverage"
git push origin ${{ inputs.coverage-branch }}

0 comments on commit d7f0fb3

Please sign in to comment.