File tree 5 files changed +16
-4
lines changed
5 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 41
41
python-version : ${{ matrix.python_version }}
42
42
43
43
- name : Run tests on Python ${{ matrix.python_version }}
44
- run : make test
44
+ run : make testcov
45
+
46
+ - name : Upload coverage report
47
+ uses : codecov/codecov-action@v1
48
+ if : matrix.python_version == '3.9' && github.ref == 'refs/heads/master'
45
49
46
50
distrib :
47
51
name : Build and upload the packages
Original file line number Diff line number Diff line change 3
3
. *
4
4
__pycache__
5
5
build
6
+ coverage.xml
6
7
dist
7
8
htmlcov
Original file line number Diff line number Diff line change 1
1
.DEFAULT : help
2
- .PHONY : help bootstrap build lint outdated test testreport upload clean
2
+ .PHONY : help bootstrap build lint outdated test testcov testreport upload clean
3
3
4
4
VENV = .venv
5
5
PYTHON_BIN ?= python3
13
13
@echo " lint - inspect project source code for errors"
14
14
@echo " outdated - list outdated project requirements"
15
15
@echo " test - run project tests"
16
+ @echo " testcov - run project tests with coverage file report"
16
17
@echo " testreport - run project tests and open HTML coverage report"
17
18
@echo " upload - upload built packages to package repository"
18
19
@echo " clean - clean up project environment and all the build artifacts"
@@ -35,6 +36,9 @@ outdated: bootstrap
35
36
test : bootstrap
36
37
$(PYTHON ) -m pytest
37
38
39
+ testcov : bootstrap
40
+ $(PYTHON ) -m pytest --cov-report=xml
41
+
38
42
testreport : bootstrap
39
43
$(PYTHON ) -m pytest --cov-report=html
40
44
xdg-open htmlcov/index.html
@@ -43,4 +47,4 @@ upload: build
43
47
$(PYTHON ) -m twine upload dist/*
44
48
45
49
clean :
46
- rm -rf * .egg-info .eggs .pytest_cache build dist htmlcov $(VENV )
50
+ rm -rf * .egg-info .eggs .pytest_cache coverage.xml build dist htmlcov $(VENV )
Original file line number Diff line number Diff line change 7
7
:alt: Build Status
8
8
:target: https://github.com/martyanov/aonvif/actions?query=event%3Apush+branch%3Amaster+workflow%3ACI
9
9
10
+ .. image :: https://codecov.io/gh/martyanov/aonvif/coverage.svg?branch=master
11
+ :alt: Coverage report
12
+ :target: https://codecov.io/gh/martyanov/aonvif/branch/master
13
+
10
14
.. image :: https://img.shields.io/pypi/v/aonvif.svg
11
15
:alt: PyPI Version
12
16
:target: https://pypi.python.org/pypi/aonvif
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ max-line-length = 95
4
4
[tool:pytest]
5
5
addopts =
6
6
--cov =onvif
7
- onvif
8
7
tests
9
8
filterwarnings =
10
9
ignore:defusedxml.lxml is no longer supported:DeprecationWarning
You can’t perform that action at this time.
0 commit comments