Skip to content

Commit 7b8bbfe

Browse files
committed
Report test coverage to codecov
1 parent c1df014 commit 7b8bbfe

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/codecov.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Code Coverage
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
code-coverage:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Python 3.10
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: '3.10'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
python -m pip install tox==3.24.5
22+
python -m venv .venv
23+
source .venv/bin/activate
24+
pip install -e .
25+
26+
- name: Run tox
27+
run: tox -e cov
28+
29+
- name: Upload coverage to Codecov
30+
uses: codecov/codecov-action@v3
31+
with:
32+
token: ${{ secrets.CODECOV_TOKEN }}
33+
fail_ci_if_error: true
34+
override_branch: main
35+
verbose: true

0 commit comments

Comments
 (0)