-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add workflow to comment coverage * Rename output * Fix low coverage + coverage report * Update coverage command * Update to latest agent
- Loading branch information
Showing
3 changed files
with
72 additions
and
18 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Comment coverage | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Tests] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
comment: | ||
name: Comment coverage | ||
runs-on: ubuntu-latest | ||
if: > | ||
github.event.workflow_run.event == 'pull_request' && | ||
github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
run-id: ${{ github.event.workflow_run.id }} | ||
- name: Comment coverage | ||
uses: MishaKav/pytest-coverage-comment@a1fe18e2b00c64a765568e2edb9f1706eb8fc88b | ||
with: | ||
pytest-xml-coverage-path: coverage.xml | ||
junitxml-path: coverage-junit.xml | ||
issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} | ||
coverage-path-prefix: code/ | ||
report-only-changed-files: true |
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[run] | ||
omit = | ||
tests/* | ||
|
||
[report] | ||
skip_empty = true | ||
include_namespace_packages = true |