.travis.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. language: python
  2. dist: xenial
  3. python: '3.7.4'
  4. cache: false
  5. env:
  6. global:
  7. - PYTEST_ADDOPTS="-vv --showlocals --durations=100 --exitfirst"
  8. - PYTEST_COVERAGE=1
  9. # setuptools-scm needs all tags in order to obtain a proper version
  10. git:
  11. depth: false
  12. install:
  13. - python -m pip install --upgrade --pre tox
  14. jobs:
  15. include:
  16. # Coverage for:
  17. # - TestArgComplete (linux only)
  18. # - numpy
  19. # - verbose=0
  20. - stage: baseline
  21. env: TOXENV=py27-xdist
  22. python: '2.7'
  23. - env: TOXENV=py38-xdist
  24. python: '3.8'
  25. - stage: tests
  26. # - _pytest.unittest._handle_skip (via pexpect).
  27. env: TOXENV=py27-pexpect,py27-twisted
  28. python: '2.7'
  29. - env: TOXENV=py35-xdist
  30. python: '3.5.9'
  31. - env: TOXENV=py36-xdist PYTEST_REORDER_TESTS=0
  32. python: '3.6.9'
  33. - env: TOXENV=py37-numpy-pexpect-twisted
  34. python: '3.7.4'
  35. # - test_sys_breakpoint_interception (via pexpect).
  36. - env: TOXENV=py37-pexpect,py37-twisted
  37. python: '3.7.4'
  38. # Run also non-verbosely, to gain coverage
  39. - env: TOXENV=py38-xdist PYTEST_ADDOPTS=""
  40. python: '3.8'
  41. - env: TOXENV=linting,docs,doctesting
  42. cache:
  43. directories:
  44. - $HOME/.cache/pre-commit
  45. before_script:
  46. - |
  47. # Do not (re-)upload coverage with cron runs.
  48. if [[ "$TRAVIS_EVENT_TYPE" = cron ]]; then
  49. PYTEST_COVERAGE=0
  50. fi
  51. - |
  52. if [[ "$PYTEST_COVERAGE" = 1 ]]; then
  53. export COVERAGE_FILE="$PWD/.coverage"
  54. export COVERAGE_PROCESS_START="$PWD/.coveragerc"
  55. export _PYTEST_TOX_COVERAGE_RUN="coverage run -m"
  56. export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
  57. fi
  58. script: env COLUMNS=120 python -m tox
  59. after_success:
  60. - |
  61. if [[ "$PYTEST_COVERAGE" = 1 ]]; then
  62. env CODECOV_NAME="$TOXENV-$TRAVIS_OS_NAME" scripts/report-coverage.sh
  63. fi
  64. branches:
  65. only:
  66. - 4.6.x