-
Notifications
You must be signed in to change notification settings - Fork 8
33 lines (28 loc) · 843 Bytes
/
coverage.yaml
File metadata and controls
33 lines (28 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Coverage report
on:
workflow_run:
workflows: ["CI"]
types: [completed]
permissions:
pull-requests: write
actions: read
jobs:
coverage:
if: >-
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
with:
name: coverage
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: pr
run: echo "number=$(cat pr-number.txt)" >> "$GITHUB_OUTPUT"
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@v1
with:
issue-number: ${{ steps.pr.outputs.number }}
pytest-xml-coverage-path: ./coverage.xml
junitxml-path: ./pytest.xml