2017-04-27 15:24:06 -05:00
|
|
|
environment:
|
|
|
|
|
global:
|
|
|
|
|
TEST: -v --durations 25
|
|
|
|
|
PYTHONFAULTHANDLER: x
|
|
|
|
|
PYTHONWARNINGS: all
|
|
|
|
|
|
|
|
|
|
matrix:
|
2018-08-11 06:19:08 +02:00
|
|
|
- PYTHON: 37
|
2018-08-10 18:50:02 +02:00
|
|
|
- PYTHON: 37-x64
|
2017-04-27 15:24:06 -05:00
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
- C:\Python%PYTHON%\python.exe -m pip install -U pip setuptools
|
2017-10-03 09:46:28 +01:00
|
|
|
- C:\Python%PYTHON%\python.exe -m pip install .[test,websupport]
|
2017-04-27 15:24:06 -05:00
|
|
|
|
2018-02-04 18:21:16 +01:00
|
|
|
cache:
|
|
|
|
|
- '%LOCALAPPDATA%\pip\Cache'
|
|
|
|
|
|
2017-04-27 15:24:06 -05:00
|
|
|
# No automatic build, just run python tests
|
|
|
|
|
build: off
|
|
|
|
|
|
2017-06-14 14:21:07 -05:00
|
|
|
# Update build information before testing, no warnings during this step
|
|
|
|
|
before_test:
|
|
|
|
|
- ps: |
|
|
|
|
|
$py_warnings = $env:PYTHONWARNINGS
|
|
|
|
|
$env:PYTHONWARNINGS = 'ignore'
|
|
|
|
|
Update-AppveyorBuild -Version ((& "C:\Python$($env:PYTHON)\python.exe" -m sphinx --version).Split(' ')[2])
|
|
|
|
|
$env:PYTHONWARNINGS = $py_warnings
|
|
|
|
|
|
2017-04-27 15:24:06 -05:00
|
|
|
test_script:
|
2017-06-14 14:21:07 -05:00
|
|
|
- ps: |
|
|
|
|
|
Push-Location tests
|
|
|
|
|
$test_ignore = $env:TEST_IGNORE
|
|
|
|
|
if (-not $test_ignore) { $test_ignore = '' }
|
|
|
|
|
$tests = $env:TEST
|
|
|
|
|
if (-not $tests) { $tests = '' }
|
2017-12-22 18:50:51 +00:00
|
|
|
& "C:\Python$($env:PYTHON)\python.exe" -m pytest $test_ignore.Split(' ') --junitxml .junit.xml $tests.Split(' ')
|
2017-06-14 14:21:07 -05:00
|
|
|
Pop-Location
|
2019-01-13 15:30:47 +09:00
|
|
|
if ($LastExitCode -eq 1) { Write-Host "Test Failures Occurred, leaving for test result parsing"; exit $LastExitCode }
|
2017-06-14 14:21:07 -05:00
|
|
|
elseif ($LastExitCode -ne 0) { Write-Host "Other Error Occurred, aborting"; exit $LastExitCode }
|
2017-06-14 14:06:05 -05:00
|
|
|
|
|
|
|
|
after_test:
|
2017-06-14 14:21:07 -05:00
|
|
|
- ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path (Join-Path tests .junit.xml)))
|
2018-02-04 18:21:16 +01:00
|
|
|
|
|
|
|
|
after_build:
|
|
|
|
|
# Remove old or huge cache files to hopefully not exceed the 1GB cache limit.
|
|
|
|
|
#
|
|
|
|
|
# If the cache limit is reached, the cache will not be updated (of not even
|
|
|
|
|
# created in the first run). So this is a trade of between keeping the cache
|
|
|
|
|
# current and having a cache at all.
|
|
|
|
|
# NB: This is done only `on_success` since the cache in uploaded only on
|
|
|
|
|
# success anyway.
|
|
|
|
|
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete
|
|
|
|
|
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete
|
|
|
|
|
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete
|
|
|
|
|
# Show size of cache
|
|
|
|
|
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
|