We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55ae2e2 commit e9c039aCopy full SHA for e9c039a
1 file changed
.github/workflows/coverage.yml
@@ -0,0 +1,30 @@
1
+name: Run Tests and Upload Coverage
2
+
3
+on: [push, pull_request]
4
5
+jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
11
+ - name: Set up Python
12
+ uses: actions/setup-python@v5
13
+ with:
14
+ python-version: "3.11"
15
16
+ - name: Install dependencies
17
+ run: |
18
+ pip install -r requirements.txt
19
+ pip install pytest pytest-cov
20
21
+ - name: Run tests with coverage
22
+ run: pytest --cov=. --cov-report=xml
23
24
+ - name: Upload coverage to Codecov
25
+ uses: codecov/codecov-action@v4
26
27
+ # For public repos, omit the token.
28
+ # For private repos, add CODECOV_TOKEN in Settings → Secrets → Actions
29
+ token: ${{ secrets.CODECOV_TOKEN }}
30
+ files: ./coverage.xml
0 commit comments