commit
f1254c4461
|
@ -22,8 +22,8 @@
|
|||
.. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master
|
||||
:target: https://travis-ci.org/pytest-dev/pytest
|
||||
|
||||
.. image:: https://ci.appveyor.com/api/projects/status/mrgbjaua7t33pg6b?svg=true
|
||||
:target: https://ci.appveyor.com/project/pytestbot/pytest
|
||||
.. image:: https://dev.azure.com/pytest-dev/pytest/_apis/build/status/pytest-CI?branchName=master
|
||||
:target: https://dev.azure.com/pytest-dev/pytest
|
||||
|
||||
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
||||
:target: https://github.com/ambv/black
|
||||
|
|
47
appveyor.yml
47
appveyor.yml
|
@ -1,47 +0,0 @@
|
|||
environment:
|
||||
global:
|
||||
PYTEST_NO_COVERAGE: "1"
|
||||
matrix:
|
||||
- TOXENV: "py37-xdist"
|
||||
- TOXENV: "py27-xdist"
|
||||
- TOXENV: "linting,docs,doctesting"
|
||||
- TOXENV: "py34-xdist"
|
||||
- TOXENV: "py35-xdist"
|
||||
- TOXENV: "py36-xdist"
|
||||
# NOTE: pypy-xdist is buggy currently (https://github.com/pytest-dev/pytest-xdist/issues/142).
|
||||
- TOXENV: "pypy"
|
||||
# Specialized factors for py27.
|
||||
- TOXENV: "py27-trial,py27-numpy,py27-nobyte"
|
||||
# Specialized factors for py37.
|
||||
- TOXENV: "py37-trial,py37-numpy"
|
||||
- TOXENV: "py37-freeze"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
install:
|
||||
- echo Installed Pythons
|
||||
- dir c:\Python*
|
||||
|
||||
- set PATH=C:\Python36;C:\Python36\Scripts;%PATH%
|
||||
|
||||
- if "%TOXENV%" == "pypy" call scripts\install-pypy.bat
|
||||
|
||||
- python -m pip install --upgrade pip
|
||||
- python -m pip install --upgrade --pre tox
|
||||
|
||||
build: false # Not a C# project, build stuff at the test step instead.
|
||||
|
||||
before_test:
|
||||
- call scripts\prepare-coverage.bat
|
||||
|
||||
test_script:
|
||||
- python -m tox
|
||||
|
||||
cache:
|
||||
- '%LOCALAPPDATA%\pip\cache'
|
||||
- '%USERPROFILE%\.cache\pre-commit'
|
||||
|
||||
# We don't deploy anything on tags with AppVeyor, we use Travis instead, so we
|
||||
# might as well save resources
|
||||
skip_tags: true
|
|
@ -8,8 +8,7 @@ variables:
|
|||
python.exe: "python"
|
||||
COVERAGE_FILE: "$(Build.Repository.LocalPath)/.coverage"
|
||||
COVERAGE_PROCESS_START: "$(Build.Repository.LocalPath)/.coveragerc"
|
||||
_PYTEST_TOX_COVERAGE_RUN: "coverage run -m"
|
||||
_PYTEST_TOX_EXTRA_DEP: "coverage-enable-subprocess"
|
||||
PYTEST_COVERAGE: '0'
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -21,16 +20,20 @@ jobs:
|
|||
py27:
|
||||
python.version: '2.7'
|
||||
tox.env: 'py27'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py27-xdist:
|
||||
python.version: '2.7'
|
||||
tox.env: 'py27-xdist'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py27-numpy/nobyte:
|
||||
python.version: '2.7'
|
||||
tox.env: 'py27-numpy,py27-nobyte'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py27-trial:
|
||||
python.version: '2.7'
|
||||
tox.env: 'py27-trial'
|
||||
python.needs_vc: True
|
||||
PYTEST_COVERAGE: '1'
|
||||
py27-pluggymaster-xdist:
|
||||
python.version: '2.7'
|
||||
tox.env: 'py27-pluggymaster-xdist'
|
||||
|
@ -38,30 +41,33 @@ jobs:
|
|||
python.version: 'pypy'
|
||||
tox.env: 'pypy'
|
||||
python.exe: 'pypy'
|
||||
_PYTEST_TOX_COVERAGE_RUN: ""
|
||||
_PYTEST_TOX_EXTRA_DEP: ""
|
||||
PYTEST_NO_COVERAGE: "1"
|
||||
py34:
|
||||
python.version: '3.4'
|
||||
tox.env: 'py34'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py35:
|
||||
python.version: '3.5'
|
||||
tox.env: 'py35'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py36:
|
||||
python.version: '3.6'
|
||||
tox.env: 'py36'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py37:
|
||||
python.version: '3.7'
|
||||
tox.env: 'py37'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py37-linting/docs/doctesting:
|
||||
python.version: '3.7'
|
||||
tox.env: 'linting,docs,doctesting'
|
||||
py37-xdist:
|
||||
python.version: '3.7'
|
||||
tox.env: 'py37-xdist'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py37-trial/numpy:
|
||||
python.version: '3.7'
|
||||
tox.env: 'py37-trial,py37-numpy'
|
||||
PYTEST_COVERAGE: '1'
|
||||
py37-pluggymaster-xdist:
|
||||
python.version: '3.7'
|
||||
tox.env: 'py37-pluggymaster-xdist'
|
||||
|
@ -98,7 +104,9 @@ jobs:
|
|||
- script: $(python.exe) -m pip install --upgrade pip && $(python.exe) -m pip install tox
|
||||
displayName: 'Install tox'
|
||||
|
||||
- script: $(python.exe) -m tox -e $(tox.env)
|
||||
- script: |
|
||||
call scripts/setup-coverage-vars.bat || goto :eof
|
||||
$(python.exe) -m tox -e $(tox.env)
|
||||
displayName: 'Run tests'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
|
@ -109,5 +117,6 @@ jobs:
|
|||
|
||||
- script: call scripts\upload-coverage.bat
|
||||
displayName: 'Upload coverage'
|
||||
condition: eq(variables['PYTEST_COVERAGE'], '1')
|
||||
env:
|
||||
CODECOV_TOKEN: $(CODECOV_TOKEN)
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
REM install pypy using choco
|
||||
REM redirect to a file because choco install python.pypy is too noisy. If the command fails, write output to console
|
||||
choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1)
|
||||
set PATH=C:\tools\pypy\pypy;%PATH% # so tox can find pypy
|
||||
echo PyPy installed
|
||||
pypy --version
|
|
@ -1,10 +0,0 @@
|
|||
REM scripts called by AppVeyor to setup the environment variables to enable coverage
|
||||
if not defined PYTEST_NO_COVERAGE (
|
||||
set "COVERAGE_FILE=%CD%\.coverage"
|
||||
set "COVERAGE_PROCESS_START=%CD%\.coveragerc"
|
||||
set "_PYTEST_TOX_COVERAGE_RUN=coverage run -m"
|
||||
set "_PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess"
|
||||
echo Coverage setup completed
|
||||
) else (
|
||||
echo Skipping coverage setup, PYTEST_NO_COVERAGE is set
|
||||
)
|
|
@ -0,0 +1,7 @@
|
|||
if "%PYTEST_COVERAGE%" == "1" (
|
||||
set "_PYTEST_TOX_COVERAGE_RUN=coverage run -m"
|
||||
set "_PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess"
|
||||
echo Coverage vars configured, PYTEST_COVERAGE=%PYTEST_COVERAGE%
|
||||
) else (
|
||||
echo Skipping coverage vars setup, PYTEST_COVERAGE=%PYTEST_COVERAGE%
|
||||
)
|
|
@ -1,5 +1,5 @@
|
|||
REM script called by AppVeyor to combine and upload coverage information to codecov
|
||||
if not defined PYTEST_NO_COVERAGE (
|
||||
REM script called by Azure to combine and upload coverage information to codecov
|
||||
if "%PYTEST_COVERAGE%" == "1" (
|
||||
echo Prepare to upload coverage information
|
||||
if defined CODECOV_TOKEN (
|
||||
echo CODECOV_TOKEN defined
|
||||
|
@ -12,5 +12,5 @@ if not defined PYTEST_NO_COVERAGE (
|
|||
coverage report -m --ignore-errors
|
||||
scripts\retry codecov --required -X gcov pycov search -f coverage.xml --flags windows
|
||||
) else (
|
||||
echo Skipping coverage upload, PYTEST_NO_COVERAGE is set
|
||||
echo Skipping coverage upload, PYTEST_COVERAGE=%PYTEST_COVERAGE%
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue