File tree 8 files changed +46
-45
lines changed
8 files changed +46
-45
lines changed Original file line number Diff line number Diff line change 1
- CHANGELOG merge = union
1
+ * .bat text eol = crlf
Original file line number Diff line number Diff line change 35
35
.cache
36
36
.pytest_cache
37
37
.coverage
38
+ .coverage. *
39
+ coverage.xml
38
40
.ropeproject
39
41
.idea
40
42
.hypothesis
Original file line number Diff line number Diff line change 82
82
before_script :
83
83
- |
84
84
if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then
85
- export _PYTEST_TOX_COVERAGE_RUN="env COVERAGE_FILE=$PWD/.coverage COVERAGE_PROCESS_START=$PWD/.coveragerc coverage run --source {envsitepackagesdir}/_pytest/,$PWD/testing -m"
85
+ export COVERAGE_FILE="$PWD/.coverage"
86
+ export COVERAGE_PROCESS_START="$PWD/.coveragerc"
87
+ export _PYTEST_TOX_COVERAGE_RUN="coverage run --source {envsitepackagesdir}/_pytest/,{toxinidir}/testing -m"
86
88
export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
87
89
fi
88
90
@@ -94,9 +96,9 @@ after_success:
94
96
set -e
95
97
pip install codecov
96
98
coverage combine
97
- coverage xml
98
- coverage report -m
99
- codecov --required -X gcov pycov search -f coverage.xml --flags ${TOXENV//-/ }
99
+ coverage xml --ignore-errors
100
+ coverage report -m --ignore-errors
101
+ codecov --required -X gcov pycov search -f coverage.xml --flags ${TOXENV//-/ } linux
100
102
101
103
# Coveralls does not support merged reports.
102
104
if [[ "$TOXENV" = py37 ]]; then
Original file line number Diff line number Diff line change 1
1
environment :
2
- COVERALLS_REPO_TOKEN :
3
- secure : 2NJ5Ct55cHJ9WEg3xbSqCuv0rdgzzb6pnzOIG5OkMbTndw3wOBrXntWFoQrXiMFi
4
- # this is pytest's token in coveralls.io, encrypted
5
- # using pytestbot account as detailed here:
6
- # https://www.appveyor.com/docs/build-configuration#secure-variables
7
-
8
2
matrix :
9
- # coveralls is not in the default env list
10
- - TOXENV : " coveralls"
11
- # note: please use "tox --listenvs" to populate the build matrix below
12
3
- TOXENV : " linting"
4
+ PYTEST_NO_COVERAGE : " 1"
13
5
- TOXENV : " py27"
14
6
- TOXENV : " py34"
15
7
- TOXENV : " py35"
16
8
- TOXENV : " py36"
17
9
- TOXENV : " py37"
18
10
- TOXENV : " pypy"
19
- - TOXENV : " py27-pexpect "
11
+ PYTEST_NO_COVERAGE : " 1 "
20
12
- TOXENV : " py27-xdist"
21
13
- TOXENV : " py27-trial"
22
14
- TOXENV : " py27-numpy"
23
15
- TOXENV : " py27-pluggymaster"
24
- - TOXENV : " py36-pexpect"
25
16
- TOXENV : " py36-xdist"
26
17
- TOXENV : " py36-trial"
27
18
- TOXENV : " py36-numpy"
28
19
- TOXENV : " py36-pluggymaster"
29
20
- TOXENV : " py27-nobyte"
30
21
- TOXENV : " doctesting"
31
22
- TOXENV : " py36-freeze"
23
+ PYTEST_NO_COVERAGE : " 1"
32
24
- TOXENV : " docs"
25
+ PYTEST_NO_COVERAGE : " 1"
33
26
34
27
install :
35
28
- echo Installed Pythons
36
29
- dir c:\Python*
37
30
38
31
- if "%TOXENV%" == "pypy" call scripts\install-pypy.bat
39
32
33
+ - C:\Python36\python -m pip install --upgrade pip
40
34
- C:\Python36\python -m pip install --upgrade --pre tox
41
35
42
36
build : false # Not a C# project, build stuff at the test step instead.
43
37
38
+ before_test :
39
+ - call scripts\prepare-coverage.bat
40
+
44
41
test_script :
45
- - call scripts\call-tox.bat
42
+ - C:\Python36\python -m tox
43
+
44
+ on_success :
45
+ - call scripts\upload-coverage.bat
46
46
47
47
cache :
48
48
- ' %LOCALAPPDATA%\pip\cache'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ REM scripts called by AppVeyor to setup the environment variables to enable coverage
2
+ if not defined PYTEST_NO_COVERAGE (
3
+ set " COVERAGE_FILE = %CD% \.coverage"
4
+ set " COVERAGE_PROCESS_START = %CD% \.coveragerc"
5
+ set " _PYTEST_TOX_COVERAGE_RUN = coverage run --source {envsitepackagesdir}/_pytest/,{toxinidir}/testing -m"
6
+ set " _PYTEST_TOX_EXTRA_DEP = coverage-enable-subprocess"
7
+ echo Coverage setup completed
8
+ ) else (
9
+ echo Skipping coverage setup, PYTEST_NO_COVERAGE is set
10
+ )
Original file line number Diff line number Diff line change
1
+ REM script called by AppVeyor to combine and upload coverage information to codecov
2
+ if not defined PYTEST_NO_COVERAGE (
3
+ echo Prepare to upload coverage information
4
+ C:\Python36\Scripts\pip install codecov
5
+ C:\Python36\Scripts\coverage combine
6
+ C:\Python36\Scripts\coverage xml --ignore-errors
7
+ C:\Python36\Scripts\coverage report -m --ignore-errors
8
+ C:\Python36\Scripts\codecov --required -X gcov pycov search -f coverage.xml --flags %TOXENV:- = % windows
9
+ ) else (
10
+ echo Skipping coverage upload, PYTEST_NO_COVERAGE is set
11
+ )
Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ envlist =
18
18
19
19
[testenv]
20
20
commands =
21
- {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof -ra {env:_PYTEST_TEST_OPTS:} { posargs:testing}
22
- coverage: coverage report -m --skip-covered
21
+ {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof -ra {posargs:testing}
22
+ passenv = USER USERNAME
23
23
setenv =
24
+ # configuration if a user runs tox with a "coverage" factor, for example "tox -e py36-coverage"
24
25
coverage: _PYTEST_TOX_COVERAGE_RUN =coverage run -m
25
26
coverage: _PYTEST_TOX_EXTRA_DEP =coverage-enable-subprocess
26
27
coverage: COVERAGE_FILE ={toxinidir}/.coverage
27
28
coverage: COVERAGE_PROCESS_START ={toxinidir}/.coveragerc
28
- passenv = USER USERNAME
29
29
deps =
30
30
hypothesis>=3.56
31
31
nose
56
56
nose
57
57
hypothesis>=3.56
58
58
{env:_PYTEST_TOX_EXTRA_DEP:}
59
- changedir =testing
60
59
commands =
61
- {env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n8 -ra {posargs:. }
60
+ {env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n8 -ra {posargs:testing }
62
61
63
62
[testenv:py36-xdist]
64
63
deps = {[testenv:py27-xdist]deps}
@@ -177,21 +176,6 @@ commands =
177
176
{envpython} create_executable.py
178
177
{envpython} tox_run.py
179
178
180
-
181
- [testenv:coveralls]
182
- passenv = CI TRAVIS TRAVIS_* COVERALLS_REPO_TOKEN
183
- usedevelop = True
184
- changedir = .
185
- deps =
186
- {[testenv]deps}
187
- coveralls
188
- codecov
189
- commands =
190
- coverage run -m pytest testing
191
- coverage report -m
192
- coveralls
193
- codecov
194
-
195
179
[testenv:release]
196
180
decription = do a release, required posarg of the version number
197
181
basepython = python3.6
You can’t perform that action at this time.
0 commit comments