diff --git a/appveyor.yml b/appveyor.yml index 46a72a30d..acfac306f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,27 +9,37 @@ environment: matrix: - GENERATOR: 'Visual Studio 10' PYTHON: 'C:\Python27\python.exe' + TOXENV: py27 - GENERATOR: 'Visual Studio 10 Win64' PYTHON: 'C:\Python27-x64\python.exe' + TOXENV: py27 - GENERATOR: 'Visual Studio 10' PYTHON: 'C:\Python34\python.exe' + TOXENV: py34 - GENERATOR: 'Visual Studio 10 Win64' PYTHON: 'C:\Python34-x64\python.exe' + TOXENV: py34 - GENERATOR: 'Visual Studio 14' PYTHON: 'C:\Python35\python.exe' + TOXENV: py35 - GENERATOR: 'Visual Studio 14 Win64' PYTHON: 'C:\Python35-x64\python.exe' + TOXENV: py35 - GENERATOR: 'Visual Studio 14' PYTHON: 'C:\Python36\python.exe' + TOXENV: py36 - GENERATOR: 'Visual Studio 14 Win64' PYTHON: 'C:\Python36-x64\python.exe' + TOXENV: py36 - GENERATOR: 'Visual Studio 14' PYTHON: 'C:\Python37\python.exe' + TOXENV: py37 - GENERATOR: 'Visual Studio 14 Win64' PYTHON: 'C:\Python37-x64\python.exe' + TOXENV: py37 init: -- cmd: '%PYTHON% -m pip install -U nose wheel' +- cmd: '%PYTHON% -m pip install -U wheel tox' build_script: - cmd: | @@ -48,12 +58,14 @@ build_script: test_script: - ps: | - cp build\Release\git2.dll . - &$env:PYTHON setup.py nosetests --with-xunit + $env:LIBGIT2 = ($Env:APPVEYOR_BUILD_FOLDER + "\build\libgit2") + &$env:PYTHON -m tox + if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } + # upload results to AppVeyor $wc = New-Object 'System.Net.WebClient' - $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\nosetests.xml)) + $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path ".\junit-$env:TOXENV.xml")) artifacts: - path: dist\*.whl diff --git a/tox.ini b/tox.ini index 90ae8c96c..5e9381f40 100644 --- a/tox.ini +++ b/tox.ini @@ -3,4 +3,6 @@ envlist = py27,py34,py35,py36,py37,pypy,pypy3 [testenv] deps = pytest -commands = pytest {posargs} +commands = pytest --junitxml=junit-{envname}.xml {posargs} +passenv = LIBGIT2 +basepython = {env:PYTHON:}