File tree 4 files changed +41
-6
lines changed
4 files changed +41
-6
lines changed Original file line number Diff line number Diff line change
1
+ [coverage:report]
2
+ precision = 2
3
+ show_missing = true
Original file line number Diff line number Diff line change 22
22
strategy :
23
23
matrix :
24
24
include :
25
- - os : ubuntu-18.04
26
- name : linting-ubuntu
27
- python-version : 3.6
28
-
29
25
- os : ubuntu-18.04
30
26
name : py36-ubuntu
31
27
python-version : 3.6
@@ -111,7 +107,15 @@ jobs:
111
107
split-by : ' -'
112
108
- name : Test with tox
113
109
run : |
114
- python -m tox -e ${{ steps.split-matrix-name.outputs._0}}
110
+ python -m tox -e ${{ steps.split-matrix-name.outputs._0}}-cov
111
+ - name : Upload coverage to codecov
112
+ uses : codecov/codecov-action@v1
113
+ with :
114
+ fail_ci_if_error : true
115
+ file : ./coverage.xml
116
+ flags : tests
117
+ name : ${{ matrix.py }} - ${{ matrix.os }}
118
+ verbose : true
115
119
build_javascript :
116
120
name : grunt
117
121
runs-on : ubuntu-18.04
@@ -129,6 +133,21 @@ jobs:
129
133
npm test
130
134
env :
131
135
CI : true
136
+ linting :
137
+ name : linting
138
+ runs-on : ubuntu-18.04
139
+ steps :
140
+ - uses : actions/checkout@master
141
+ - name : Set up Python
142
+ uses : actions/setup-python@v2
143
+ with :
144
+ python-version : 3.6
145
+ - name : Install tox
146
+ run : |
147
+ python -m pip install --upgrade tox
148
+ - name : Lint with tox
149
+ run : |
150
+ python -m tox -e linting
132
151
publish :
133
152
name : Publish to PyPI registry
134
153
needs :
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ __pycache__
6
6
build
7
7
dist
8
8
9
+ # Codecov
10
+ .coverage
11
+ coverage.xml
12
+
9
13
# IDE Specific files/folders
10
14
# # Pycharm IDE - Jetbrains
11
15
.idea /*
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ deps =
14
14
pytest-rerunfailures
15
15
pytest-mock
16
16
ansi2html # soft-dependency
17
- commands = pytest -v -r a --color =yes --html ={envlogdir}/report.html --self-contained-html {posargs}
17
+ cov: pytest-cov
18
+ commands =
19
+ !cov: pytest -v -r a --color =yes --html ={envlogdir}/report.html --self-contained-html {posargs}
20
+ cov: pytest -v -r a --color =yes --html ={envlogdir}/report.html --self-contained-html --cov ={envsitepackagesdir}/pytest_html --cov-report =term --cov-report =xml {posargs}
18
21
19
22
[testenv:linting]
20
23
skip_install = True
@@ -34,6 +37,12 @@ deps =
34
37
# https://github.com/pytest-dev/pytest-rerunfailures/issues/134
35
38
# pytest @ git+https://github.com/pytest-dev/pytest.git
36
39
40
+ [testenv:devel-cov]
41
+ description = Tests with unreleased deps and coverage
42
+ basepython = {[testenv:devel]basepython}
43
+ pip_pre = {[testenv:devel]pip_pre}
44
+ deps = {[testenv:devel]deps}
45
+
37
46
[testenv:packaging]
38
47
description =
39
48
Do packaging/distribution. If tag is not present or PEP440 compliant upload to
You can’t perform that action at this time.
0 commit comments