-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
073b171
commit 37ae074
Showing
1 changed file
with
27 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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" |