Skip to content

Commit 33796c8

Browse files
authored
Merge pull request #2084 from nicoddemus/fix-coveralls-appveyor
Only execute "coveralls" toxenv once on AppVeyor
2 parents b3efd9a + 8763590 commit 33796c8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

appveyor.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ environment:
66
# https://www.appveyor.com/docs/build-configuration#secure-variables
77

88
matrix:
9+
# coveralls is not in the default env list
10+
- TOXENV: "coveralls"
911
# note: please use "tox --listenvs" to populate the build matrix below
1012
- TOXENV: "linting"
1113
- TOXENV: "py26"
@@ -29,14 +31,11 @@ install:
2931
- echo Installed Pythons
3032
- dir c:\Python*
3133

32-
- if "%TOXENV%" == "pypy" scripts\install-pypy.bat
34+
- if "%TOXENV%" == "pypy" call scripts\install-pypy.bat
3335

3436
- C:\Python35\python -m pip install tox
3537

3638
build: false # Not a C# project, build stuff at the test step instead.
3739

3840
test_script:
39-
- C:\Python35\python -m tox
40-
# coveralls is not in tox's envlist, plus for PRs the secure variable
41-
# is not defined so we have to check for it
42-
- if defined COVERALLS_REPO_TOKEN C:\Python35\python -m tox -e coveralls
41+
- call scripts\call-tox.bat

scripts/call-tox.bat

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
REM skip "coveralls" run in PRs or forks
2+
if "%TOXENV%" == "coveralls" (
3+
if not defined COVERALLS_REPO_TOKEN (
4+
echo skipping coveralls run because COVERALLS_REPO_TOKEN is not defined
5+
exit /b 0
6+
)
7+
)
8+
C:\Python35\python -m tox

0 commit comments

Comments
 (0)