mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Simply installing packages will ensure that most of the dependencies in 'setup.py' are installed, meaning 'test-reqs.txt' need only contain those necessary for testing. The only notable change is that the 'simplejson' module is dropped from the requirements list. This included as a dependency for the PyPy target, but it appears that this is not necessary today (though it may have been when the target was added in 2011). This retains 'setup.py test' which, as noted in the tox docs [1], is sometimes expected for downstream distribution testing. We may wish to find a way to synchronize requirements between 'test-reqs.txt' and this section in the future, but that's work for another day. [1] https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command Signed-off-by: Stephen Finucane <stephen@that.guru>
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
environment:
|
|
global:
|
|
TEST: -v --durations 25
|
|
PYTHONFAULTHANDLER: x
|
|
PYTHONWARNINGS: all
|
|
|
|
matrix:
|
|
- PYTHON: 27
|
|
DOCUTILS: 0.13.1
|
|
TEST_IGNORE: --ignore py35
|
|
- PYTHON: 27
|
|
DOCUTILS: 0.14
|
|
TEST_IGNORE: --ignore py35
|
|
- PYTHON: 36
|
|
DOCUTILS: 0.14
|
|
- PYTHON: 36-x64
|
|
DOCUTILS: 0.14
|
|
|
|
install:
|
|
- C:\Python%PYTHON%\python.exe -m pip install -U pip setuptools
|
|
- C:\Python%PYTHON%\python.exe -m pip install docutils==%DOCUTILS% mock
|
|
- C:\Python%PYTHON%\python.exe -m pip install .[test,websupport]
|
|
|
|
# No automatic build, just run python tests
|
|
build: off
|
|
|
|
# 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
|
|
|
|
test_script:
|
|
- ps: |
|
|
Push-Location tests
|
|
$test_ignore = $env:TEST_IGNORE
|
|
if (-not $test_ignore) { $test_ignore = '' }
|
|
$tests = $env:TEST
|
|
if (-not $tests) { $tests = '' }
|
|
& "C:\Python$($env:PYTHON)\python.exe" run.py $test_ignore.Split(' ') --junitxml .junit.xml $tests.Split(' ')
|
|
Pop-Location
|
|
if ($LastExitCode -eq 1) { Write-Host "Test Failures Occurred, leaving for test result parsing" }
|
|
elseif ($LastExitCode -ne 0) { Write-Host "Other Error Occurred, aborting"; exit $LastExitCode }
|
|
|
|
after_test:
|
|
- 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)))
|