From 8763590eefe7d1e5e2668bcb4a057f726f5e4a0e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 24 Nov 2016 16:08:51 -0200 Subject: [PATCH] Only execute "coveralls" toxenv on master once Just noticed that the "coveralls" env was being execute after each env. This was introduced by mistake in #2056 --- appveyor.yml | 9 ++++----- scripts/call-tox.bat | 8 ++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 scripts/call-tox.bat diff --git a/appveyor.yml b/appveyor.yml index 7192ec06fb6..a42aa16dc80 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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" @@ -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 diff --git a/scripts/call-tox.bat b/scripts/call-tox.bat new file mode 100644 index 00000000000..3ca9eb6d717 --- /dev/null +++ b/scripts/call-tox.bat @@ -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