-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (37 loc) · 1.22 KB
/
pr-display-backend-coverage.yml
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
34
35
36
37
38
39
40
41
42
43
44
name: display backend coverage in PR
on:
workflow_run:
workflows: [backend]
types: [completed]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
display-backend-coverage:
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Acquire PR context
id: acquire-pr-context
uses: ./.github/actions/workflow-run/context
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
name: backend-coverage
path: coverage/
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}
- name: Display coverage reports
uses: MishaKav/pytest-coverage-comment@main
with:
issue-number: ${{ steps.acquire-pr-context.outputs.pr-number }}
pytest-coverage-path: coverage/coverage.txt
junitxml-path: coverage/coverage.xml
title: Coverage Report for backend