Skip to content

Commit

Permalink
Added svg saving to the test workflow for coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
micahjohnson150 committed Sep 6, 2023
1 parent 0670c9e commit 4819aec
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,25 @@ jobs:
coverage report -m
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2
uses: tj-actions/coverage-badge-py@v2

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: coverage.svg

- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
branch: ${{ github.ref }}

0 comments on commit 4819aec

Please sign in to comment.