Skip to content

Commit 9ca9eef

Browse files
committed
ci.yml: add codecov
Show coverage report at codecov.io. Also, fix coverage as pytest-cov ignores function and class definitions and imports as it runs after the import pytest_httpserver is done.
1 parent a568d70 commit 9ca9eef

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ jobs:
2727
make cs
2828
- name: Test
2929
run: |
30-
make quick-test
30+
make cov
31+
- name: Codecov upload
32+
uses: codecov/codecov-action@v1

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ test-pdb:
4242

4343
.PHONY: cov
4444
cov: cov-clean
45-
.venv/bin/pytest --cov pytest_httpserver --cov-report=term --cov-report=html --cov-report=xml tests
45+
.venv/bin/coverage run -m pytest -vv tests
46+
.venv/bin/coverage xml
4647

4748
.PHONY: cov-clean
4849
cov-clean:
49-
rm -rf htmlcov
50+
rm -rf htmlcov coverage.xml .coverage
5051

5152
.PHONY: doc
5253
doc: .venv

0 commit comments

Comments
 (0)