Skip to content

Commit

Permalink
Fix Coverage Badge
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianZaccaria committed Dec 7, 2023
1 parent 073b171 commit 37ae074
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/coverage-badge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ name: Coverage Badge
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
report:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -28,26 +30,26 @@ jobs:
run: |
coverage run -m --source=src pytest -v tests/unit_test.py
- name: Coverage Badge
uses: tj-actions/[email protected]

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

- name: Commit files
if: steps.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: Create Pull Request
if: steps.changed_files.outputs.files_changed == 'true'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "[Automatic] Coverage Badge Update"
# - name: Coverage Badge
# uses: tj-actions/[email protected]

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

# - name: Commit files
# if: steps.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: Create Pull Request
# if: steps.changed_files.outputs.files_changed == 'true'
# uses: peter-evans/create-pull-request@v4
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# title: "[Automatic] Coverage Badge Update"

0 comments on commit 37ae074

Please sign in to comment.