File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/test-coverage.yml
2+ name : Test Coverage
3+
4+ on :
5+ push :
6+ branches : [main, master]
7+ pull_request :
8+ branches : [main, master]
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Python
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : ' 3.9'
21+
22+ - name : Set up virtual environment
23+ run : |
24+ python3 -m venv .venv
25+ source .venv/bin/activate
26+ pip install --upgrade pip
27+ pip install -r requirements.txt
28+ pip install pytest pytest-cov
29+
30+ - name : Run tests with coverage
31+ run : |
32+ source .venv/bin/activate
33+ pytest --cov=src --cov-report=xml --cov-fail-under=80
34+
35+ - name : Upload coverage report
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : coverage-report
39+ path : coverage.xml
You can’t perform that action at this time.
0 commit comments