File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Tests (PR to dev)
1+ name : CI pipeline
22
33on :
44 pull_request :
55 branches :
66 - dev
7+ push :
8+ branches :
9+ - dev
710
811jobs :
912 unit-tests :
2629 python -m pip install --upgrade pip
2730 pip install -r requirements.txt -r requirements-test.txt
2831
29- - name : Run unit tests
32+ - name : Run unit tests with coverage
3033 env :
3134 USE_REDIS : " false"
32- run : python -m pytest tests/ -v
35+ run : |
36+ python -m pytest tests/ -v \
37+ --cov=ubiblio \
38+ --cov-report=term-missing \
39+ --cov-report=xml \
40+ --cov-report=html
41+
42+ - name : Upload coverage reports
43+ uses : actions/upload-artifact@v4
44+ with :
45+ name : coverage-reports
46+ path : |
47+ htmlcov/
48+ coverage.xml
49+ if-no-files-found : error
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ coverage.xml
5555.pytest_cache /
5656cover /
5757
58+
5859# Translations
5960* .mo
6061* .pot
Original file line number Diff line number Diff line change 1+ [tool .coverage .run ]
2+ source = [" ubiblio" ]
3+ branch = true
4+ omit = [
5+ " */tests/*" ,
6+ ]
7+
8+ [tool .coverage .report ]
9+ precision = 1
10+ show_missing = true
11+ skip_empty = true
Original file line number Diff line number Diff line change 11-r requirements.txt
22pytest
33httpx
4+ pytest-cov
You can’t perform that action at this time.
0 commit comments