Skip to content

Commit 14af87b

Browse files
committed
Add codecov.io integration
Signed-off-by: Cole Robinson <[email protected]>
1 parent 5578144 commit 14af87b

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,32 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v2
18+
1819
- name: Set up Python ${{ matrix.python-version }}
1920
uses: actions/setup-python@v2
2021
with:
2122
python-version: ${{ matrix.python-version }}
23+
2224
- name: Install dependencies
2325
run: |
2426
python -m pip install --upgrade pip
25-
pip install flake8 pytest
27+
pip install flake8 pytest pytest-cov
2628
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
2730
- name: Lint with flake8
2831
run: |
2932
# stop the build if there are Python syntax errors or undefined names
3033
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3134
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3235
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
33-
- name: Test with pytest
36+
37+
- name: Test with pytest and generate coverage report
3438
run: |
35-
pytest
39+
pytest --cov --cov-report=xml
40+
41+
- name: Upload coverage to Codecov
42+
uses: codecov/codecov-action@v1
43+
with:
44+
file: ./coverage.xml
45+
flags: unittests
46+
env_vars: OS,PYTHON

codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# The files aren't interesting for the unit tests run in CI
2+
ignore:
3+
- "bugzilla/_backendrest.py"
4+
- "bugzilla/_backendxmlrpc.py"

0 commit comments

Comments
 (0)