Skip to content

Commit

Permalink
Reactivate coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
jobrachem authored Sep 11, 2024
1 parent 01ac485 commit df0d6fb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,24 @@ jobs:
- name: Run pytest
run: pytest --cov=liesel --run-mcmc

- name: Create coverage badge
uses: tj-actions/coverage-badge-py@v2
with:
output: coverage-new.svg

- name: Commit coverage.svg
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git ls-remote | grep refs/heads/pytest-cov && git remote set-branches --add origin pytest-cov && git fetch
git switch pytest-cov || git switch --orphan pytest-cov
mv coverage-new.svg coverage.svg
git add coverage.svg
git diff --staged --quiet || git commit -m "Updated coverage.svg"
- name: Push coverage.svg
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: pytest-cov

0 comments on commit df0d6fb

Please sign in to comment.