appveyor: remove pythonX.Y.bat hack and simplify
running 'py' as tox environment is a shorthand for 'basepython=python', which means tox will create the venv using the 'python' executable which is first in the path, which in the case of Appveyor environment, it's the same where tox was installed in.
This commit is contained in:
parent
553f23f1db
commit
4f94da9d4d
@ -2,15 +2,12 @@ environment:
|
||||
matrix:
|
||||
- JOB: "2.7 32-bit"
|
||||
PYTHON_HOME: "C:\\Python27"
|
||||
TOXENV: "py27-cov"
|
||||
|
||||
- JOB: "3.6 64-bit"
|
||||
PYTHON_HOME: "C:\\Python36-x64"
|
||||
TOXENV: "py36-cov"
|
||||
|
||||
- JOB: "3.7 64-bit"
|
||||
PYTHON_HOME: "C:\\Python37-x64"
|
||||
TOXENV: "py37-cov"
|
||||
|
||||
install:
|
||||
# If there is a newer build queued for the same PR, cancel this one.
|
||||
@ -36,19 +33,14 @@ install:
|
||||
# install the dependencies to run the tests
|
||||
- "python -m pip install tox"
|
||||
|
||||
# Make a 'pythonX.X.bat' file in the current directory so that tox will find
|
||||
# it and 'pythonX.X' will mean what we want it to. E.g. for 'TOXENV=py37',
|
||||
# this will save a 'python3.7.bat' file containing "@C:\Python27\python %*"
|
||||
# Credit: https://nedbatchelder.com/blog/201509/appveyor.html
|
||||
- "python -c \"import os; open('python{0}.{1}.bat'.format(*os.environ['TOXENV'][2:4]), 'w').write('@{0}\\\\python \\x25*\\n'.format(os.environ['PYTHON_HOME']))\""
|
||||
|
||||
|
||||
build: false
|
||||
|
||||
test_script:
|
||||
- "tox"
|
||||
# run tests with the current 'python' in %PATH%, and measure test coverage
|
||||
- "tox -e py-cov"
|
||||
|
||||
after_test:
|
||||
# upload test coverage to Codecov.io
|
||||
- "tox -e codecov"
|
||||
|
||||
notifications:
|
||||
|
Loading…
x
Reference in New Issue
Block a user