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- coverage.ymlname : Code Coverage
1+ name : Code Coverage
2+
3+ permissions :
4+ contents : read
5+ checks : write
26
37on :
48 pull_request :
@@ -10,20 +14,25 @@ jobs:
1014 coverage :
1115 runs-on : ubuntu-latest
1216 steps :
13- - uses : actions/checkout@v3
14-
17+ - uses : actions/checkout@v4
18+
1519 - uses : actions/setup-python@v4
1620 with :
1721 python-version : ' 3.11'
18-
22+
1923 - name : Install dependencies
2024 run : |
25+ python -m pip install --upgrade pip
2126 pip install pytest pytest-cov
22- pip install -r requirements.txt 2>/dev/null || true
23-
24- - name : Run tests with coverage
27+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
29+ - name : Run coverage
2530 run : |
26- pytest tests/ --cov=. --cov-report=xml --cov-report=term || true
27-
31+ pytest --cov=. --cov-report=xml --cov-report=term-missing || true
32+
2833 - name : Upload coverage report
29- run : echo "Coverage report generated - check Actions artifacts"
34+ uses : actions/upload-artifact@v4
35+ with :
36+ name : coverage-report
37+ path : coverage.xml
38+ if-no-files-found : warn
You can’t perform that action at this time.
0 commit comments