2013-07-06 20:23:02 +08:00
|
|
|
language: python
|
2018-11-11 06:28:01 +08:00
|
|
|
dist: xenial
|
2018-05-24 19:51:01 +08:00
|
|
|
stages:
|
2018-08-28 05:46:24 +08:00
|
|
|
- baseline
|
2018-08-30 04:54:58 +08:00
|
|
|
- name: test
|
|
|
|
if: repo = pytest-dev/pytest AND tag IS NOT present
|
2018-07-07 23:12:07 +08:00
|
|
|
- name: deploy
|
|
|
|
if: repo = pytest-dev/pytest AND tag IS present
|
2019-02-28 01:31:40 +08:00
|
|
|
python: '3.7'
|
|
|
|
cache: false
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- PYTEST_ADDOPTS=-vv
|
|
|
|
|
2017-08-15 06:19:20 +08:00
|
|
|
install:
|
2019-02-27 00:06:03 +08:00
|
|
|
- python -m pip install --upgrade --pre tox
|
2019-02-06 23:11:00 +08:00
|
|
|
|
2018-02-10 06:59:15 +08:00
|
|
|
jobs:
|
2016-12-13 22:16:06 +08:00
|
|
|
include:
|
2019-03-01 21:55:09 +08:00
|
|
|
# OSX tests - first (in test stage), since they are the slower ones.
|
2018-08-27 22:13:43 +08:00
|
|
|
- &test-macos
|
2019-03-01 21:55:09 +08:00
|
|
|
# NOTE: (tests with) pexpect appear to be buggy on Travis,
|
|
|
|
# at least with coverage.
|
|
|
|
# Log: https://travis-ci.org/pytest-dev/pytest/jobs/500358864
|
2018-08-27 22:13:43 +08:00
|
|
|
os: osx
|
2019-02-26 19:31:31 +08:00
|
|
|
osx_image: xcode10.1
|
|
|
|
language: generic
|
2019-03-01 21:55:09 +08:00
|
|
|
# Coverage for:
|
|
|
|
# - py2 with symlink in test_cmdline_python_package_symlink.
|
|
|
|
env: TOXENV=py27-xdist PYTEST_COVERAGE=1
|
2019-02-26 19:31:31 +08:00
|
|
|
before_install:
|
|
|
|
- python -V
|
|
|
|
- test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 27
|
2018-08-27 22:13:43 +08:00
|
|
|
- <<: *test-macos
|
2019-02-14 01:40:53 +08:00
|
|
|
env: TOXENV=py37-xdist
|
2018-08-27 22:13:43 +08:00
|
|
|
before_install:
|
2019-02-26 19:31:31 +08:00
|
|
|
- which python3
|
|
|
|
- python3 -V
|
|
|
|
- ln -sfn "$(which python3)" /usr/local/bin/python
|
|
|
|
- python -V
|
|
|
|
- test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 37
|
2016-11-12 05:03:18 +08:00
|
|
|
|
2019-03-01 21:55:09 +08:00
|
|
|
# Full run of latest (major) supported versions, without xdist.
|
|
|
|
- env: TOXENV=py27
|
|
|
|
python: '2.7'
|
|
|
|
- env: TOXENV=py37
|
|
|
|
python: '3.7'
|
|
|
|
|
|
|
|
# Coverage tracking is slow with pypy, skip it.
|
|
|
|
- env: TOXENV=pypy-xdist
|
2019-05-04 22:54:57 +08:00
|
|
|
python: 'pypy'
|
2019-03-01 21:55:09 +08:00
|
|
|
- env: TOXENV=pypy3-xdist
|
2019-05-04 22:54:57 +08:00
|
|
|
python: 'pypy3'
|
2019-03-01 21:55:09 +08:00
|
|
|
|
|
|
|
- env: TOXENV=py34-xdist
|
|
|
|
python: '3.4'
|
|
|
|
- env: TOXENV=py35-xdist
|
|
|
|
python: '3.5'
|
|
|
|
|
|
|
|
# Coverage for:
|
|
|
|
# - pytester's LsofFdLeakChecker
|
|
|
|
# - TestArgComplete (linux only)
|
|
|
|
# - numpy
|
2019-02-28 01:31:40 +08:00
|
|
|
# Empty PYTEST_ADDOPTS to run this non-verbose.
|
|
|
|
- env: TOXENV=py37-lsof-numpy-xdist PYTEST_COVERAGE=1 PYTEST_ADDOPTS=
|
2019-03-01 21:55:09 +08:00
|
|
|
|
|
|
|
# Specialized factors for py27.
|
|
|
|
- env: TOXENV=py27-nobyte-numpy-xdist
|
|
|
|
python: '2.7'
|
|
|
|
- env: TOXENV=py27-pluggymaster-xdist
|
|
|
|
python: '2.7'
|
|
|
|
|
|
|
|
# Specialized factors for py37.
|
|
|
|
# Coverage for:
|
|
|
|
# - test_sys_breakpoint_interception (via pexpect).
|
2019-03-21 01:37:34 +08:00
|
|
|
- env: TOXENV=py37-pexpect,py37-twisted PYTEST_COVERAGE=1
|
2019-03-01 21:55:09 +08:00
|
|
|
- env: TOXENV=py37-pluggymaster-xdist
|
|
|
|
- env: TOXENV=py37-freeze
|
|
|
|
|
2019-02-16 01:51:42 +08:00
|
|
|
# Jobs only run via Travis cron jobs (currently daily).
|
2019-02-27 04:24:03 +08:00
|
|
|
- env: TOXENV=py38-xdist
|
2019-02-16 01:51:42 +08:00
|
|
|
python: '3.8-dev'
|
|
|
|
if: type = cron
|
|
|
|
|
2018-08-28 05:46:24 +08:00
|
|
|
- stage: baseline
|
2019-03-01 21:55:09 +08:00
|
|
|
# Coverage for:
|
|
|
|
# - _pytest.unittest._handle_skip (via pexpect).
|
2019-03-21 01:37:34 +08:00
|
|
|
env: TOXENV=py27-pexpect,py27-twisted PYTEST_COVERAGE=1
|
2019-03-01 21:55:09 +08:00
|
|
|
python: '2.7'
|
|
|
|
# Use py36 here for faster baseline.
|
|
|
|
- env: TOXENV=py36-xdist
|
|
|
|
python: '3.6'
|
|
|
|
- env: TOXENV=linting,docs,doctesting PYTEST_COVERAGE=1
|
2019-03-04 23:55:03 +08:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cache/pre-commit
|
2018-08-28 05:46:24 +08:00
|
|
|
|
2018-02-10 06:59:15 +08:00
|
|
|
- stage: deploy
|
|
|
|
python: '3.6'
|
|
|
|
install: pip install -U setuptools setuptools_scm
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: pypi
|
|
|
|
user: nicoddemus
|
|
|
|
distributions: sdist bdist_wheel
|
|
|
|
skip_upload_docs: true
|
|
|
|
password:
|
|
|
|
secure: xanTgTUu6XDQVqB/0bwJQXoDMnU5tkwZc5koz6mBkkqZhKdNOi2CLoC1XhiSZ+ah24l4V1E0GAqY5kBBcy9d7NVe4WNg4tD095LsHw+CRU6/HCVIFfyk2IZ+FPAlguesCcUiJSXOrlBF+Wj68wEvLoK7EoRFbJeiZ/f91Ww1sbtDlqXABWGHrmhPJL5Wva7o7+wG7JwJowqdZg1pbQExsCc7b53w4v2RBu3D6TJaTAzHiVsW+nUSI67vKI/uf+cR/OixsTfy37wlHgSwihYmrYLFls3V0bSpahCim3bCgMaFZx8S8xrdgJ++PzBCof2HeflFKvW+VCkoYzGEG4NrTWJoNz6ni4red9GdvfjGH3YCjAKS56h9x58zp2E5rpsb/kVq5/45xzV+dq6JRuhQ1nJWjBC6fSKAc/bfwnuFK3EBxNLkvBssLHvsNjj5XG++cB8DdS9wVGUqjpoK4puaXUWFqy4q3S9F86HEsKNgExtieA9qNx+pCIZVs6JCXZNjr0I5eVNzqJIyggNgJG6RyravsU35t9Zd9doL5g4Y7UKmAGTn1Sz24HQ4sMQgXdm2SyD8gEK5je4tlhUvfGtDvMSlstq71kIn9nRpFnqB6MFlbYSEAZmo8dGbCquoUc++6Rum208wcVbrzzVtGlXB/Ow9AbFMYeAGA0+N/K1e59c=
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
repo: pytest-dev/pytest
|
|
|
|
|
2019-03-01 21:55:09 +08:00
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- python: '3.8-dev'
|
|
|
|
env: TOXENV=py38-xdist
|
|
|
|
|
2017-09-27 06:46:50 +08:00
|
|
|
before_script:
|
2019-03-01 02:40:24 +08:00
|
|
|
- |
|
|
|
|
# Do not (re-)upload coverage with cron runs.
|
|
|
|
if [[ "$TRAVIS_EVENT_TYPE" = cron ]]; then
|
|
|
|
PYTEST_COVERAGE=0
|
|
|
|
fi
|
2017-09-27 06:46:50 +08:00
|
|
|
- |
|
2019-02-27 04:24:03 +08:00
|
|
|
if [[ "$PYTEST_COVERAGE" = 1 ]]; then
|
2018-09-02 21:22:20 +08:00
|
|
|
export COVERAGE_FILE="$PWD/.coverage"
|
|
|
|
export COVERAGE_PROCESS_START="$PWD/.coveragerc"
|
2018-09-17 18:00:03 +08:00
|
|
|
export _PYTEST_TOX_COVERAGE_RUN="coverage run -m"
|
2017-09-27 06:46:50 +08:00
|
|
|
export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
|
|
|
|
fi
|
|
|
|
|
2017-02-20 01:02:35 +08:00
|
|
|
script: tox --recreate
|
2014-01-23 19:18:20 +08:00
|
|
|
|
2017-09-27 06:46:50 +08:00
|
|
|
after_success:
|
|
|
|
- |
|
2019-02-27 04:24:03 +08:00
|
|
|
if [[ "$PYTEST_COVERAGE" = 1 ]]; then
|
2017-09-27 06:46:50 +08:00
|
|
|
set -e
|
2018-11-12 05:08:45 +08:00
|
|
|
# Add last TOXENV to $PATH.
|
|
|
|
PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH"
|
2017-09-27 06:46:50 +08:00
|
|
|
coverage combine
|
2019-02-27 15:44:11 +08:00
|
|
|
coverage xml
|
|
|
|
coverage report -m
|
2019-03-01 21:55:09 +08:00
|
|
|
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -n $TOXENV-$TRAVIS_OS_NAME
|
2017-09-27 06:46:50 +08:00
|
|
|
fi
|
|
|
|
|
2013-07-06 20:23:02 +08:00
|
|
|
notifications:
|
|
|
|
irc:
|
2015-06-19 17:35:58 +08:00
|
|
|
channels:
|
|
|
|
- "chat.freenode.net#pytest"
|
|
|
|
on_success: change
|
|
|
|
on_failure: change
|
|
|
|
skip_join: true
|
2013-07-06 20:23:02 +08:00
|
|
|
email:
|
|
|
|
- pytest-commit@python.org
|