forked from HKUDS/DeepCode
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (24 loc) · 785 Bytes
/
coverage.yml
File metadata and controls
30 lines (24 loc) · 785 Bytes
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
name: Run Tests and Upload Coverage
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Run tests with coverage
run: pytest --cov=. --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
# For public repos, omit the token.
# For private repos, add CODECOV_TOKEN in Settings → Secrets → Actions
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml