Skip to content

Commit

Permalink
Merge pull request pytest-dev#2084 from nicoddemus/fix-coveralls-appv…
Browse files Browse the repository at this point in the history
…eyor

Only execute "coveralls" toxenv once on AppVeyor
  • Loading branch information
nicoddemus authored Nov 24, 2016
2 parents b3efd9a + 8763590 commit 33796c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 4 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ environment:
# https://www.appveyor.com/docs/build-configuration#secure-variables

matrix:
# coveralls is not in the default env list
- TOXENV: "coveralls"
# note: please use "tox --listenvs" to populate the build matrix below
- TOXENV: "linting"
- TOXENV: "py26"
Expand All @@ -29,14 +31,11 @@ install:
- echo Installed Pythons
- dir c:\Python*

- if "%TOXENV%" == "pypy" scripts\install-pypy.bat
- if "%TOXENV%" == "pypy" call scripts\install-pypy.bat

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

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

test_script:
- C:\Python35\python -m tox
# coveralls is not in tox's envlist, plus for PRs the secure variable
# is not defined so we have to check for it
- if defined COVERALLS_REPO_TOKEN C:\Python35\python -m tox -e coveralls
- call scripts\call-tox.bat
8 changes: 8 additions & 0 deletions scripts/call-tox.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
REM skip "coveralls" run in PRs or forks
if "%TOXENV%" == "coveralls" (
if not defined COVERALLS_REPO_TOKEN (
echo skipping coveralls run because COVERALLS_REPO_TOKEN is not defined
exit /b 0
)
)
C:\Python35\python -m tox

0 comments on commit 33796c8

Please sign in to comment.