-
Notifications
You must be signed in to change notification settings - Fork 39
34 lines (34 loc) · 939 Bytes
/
Copy pathcode-coverage.yml
File metadata and controls
34 lines (34 loc) · 939 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
31
32
33
34
name: code-coverage
on:
push:
branches: [ main ]
jobs:
run:
runs-on: ubuntu-latest
env:
PYTHON: '3.12'
steps:
- uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: '3.12'
- name: Generate coverage report
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install -e .
python -m pip install pytest
python -m pip install pytest-cov
pytest --cov=p_tqdm --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
verbose: true