Skip to content

Commit ba58f7f

Browse files
authored
Add code coverage processing & upload to Github Actions workflow (#239)
* Ensure a recent version of pip, prevent automatic upgrade to tox 4.x * lint step too. * Add code coverage processing & upload to Github Actions workflow
1 parent 3feac30 commit ba58f7f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,21 @@ jobs:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install dependencies
2626
run: |
27+
pip install -U "pip>=21.1"
2728
pip install -U setuptools
28-
pip install -U tox codecov tox-gh-actions
29+
pip install -U "tox>=3.23.0,<4" codecov tox-gh-actions coverage
2930
- name: Log python & pip versions
3031
run: |
3132
python --version
3233
pip --version
3334
- name: Run unit tests
3435
run: tox
36+
- name: "Coverage report"
37+
run: coverage xml
38+
- name: "Upload coverage to Codecov"
39+
uses: "codecov/codecov-action@v1"
40+
with:
41+
fail_ci_if_error: true
3542
linting:
3643
runs-on: ubuntu-latest
3744
steps:
@@ -42,5 +49,5 @@ jobs:
4249
- name: Install dependencies
4350
run: |
4451
pip install -U setuptools
45-
pip install -U tox
52+
pip install -U "tox>=3.23.0,<4"
4653
- run: tox -e flake8

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ python =
1616
[testenv:basecommand]
1717
commands =
1818
pip --version
19-
pytest --cov-report term-missing --cov jose {posargs}
19+
pytest --cov-append --cov-report term-missing --cov jose {posargs}
2020

2121

2222
[testenv:pypy3-compatibility]

0 commit comments

Comments
 (0)