-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.19 KB
/
coverage_workflow.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
45
46
47
48
49
50
name: Code Coverage Summary
on:
push:
branches:
- '**' # Runs on all branches
jobs:
coverage-summary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9.20'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run tests with coverage
run: |
cd backend
PYTHONPATH=${{ github.workspace }}/backend pytest --cov=./ --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html
env:
PYTHONPATH: ${{ github.workspace }}/backend
- name: Move coverage reports
run: |
mv backend/coverage.xml ./coverage.xml
mv backend/htmlcov ./htmlcov
- name: Code Coverage Summary
uses: irongut/[email protected]
with:
filename: coverage.xml
badge: true
format: markdown
output: both
thresholds: '60 80'
- name: Upload Detailed Coverage Report
uses: actions/upload-artifact@v3
with:
name: coverage-details
path: htmlcov/
retention-days: 14