.travis.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. sudo: false
  2. language: python
  3. cache:
  4. directories:
  5. # we only bother to cache the wheels; parts of the http cache get
  6. # invalidated every build (because they get served with a max-age of 600
  7. # seconds), which means that we end up re-uploading the whole cache for
  8. # every build, which is time-consuming In any case, it's not obvious that
  9. # downloading the cache from S3 would be much faster than downloading the
  10. # originals from pypi.
  11. #
  12. - $HOME/.cache/pip/wheels
  13. # don't clone the whole repo history, one commit will do
  14. git:
  15. depth: 1
  16. # only build branches we care about (PRs are built seperately)
  17. branches:
  18. only:
  19. - master
  20. - develop
  21. - /^release-v/
  22. # When running the tox environments that call Twisted Trial, we can pass the -j
  23. # flag to run the tests concurrently. We set this to 2 for CPU bound tests
  24. # (SQLite) and 4 for I/O bound tests (PostgreSQL).
  25. matrix:
  26. fast_finish: true
  27. include:
  28. - python: 2.7
  29. env: TOX_ENV=packaging
  30. - python: 3.6
  31. env: TOX_ENV="pep8,check_isort"
  32. - python: 2.7
  33. env: TOX_ENV=py27 TRIAL_FLAGS="-j 2"
  34. - python: 2.7
  35. env: TOX_ENV=py27-old TRIAL_FLAGS="-j 2"
  36. - python: 2.7
  37. env: TOX_ENV=py27-postgres TRIAL_FLAGS="-j 4"
  38. services:
  39. - postgresql
  40. - python: 3.5
  41. env: TOX_ENV=py35 TRIAL_FLAGS="-j 2"
  42. - python: 3.6
  43. env: TOX_ENV=py36 TRIAL_FLAGS="-j 2"
  44. - python: 3.6
  45. env: TOX_ENV=py36-postgres TRIAL_FLAGS="-j 4"
  46. services:
  47. - postgresql
  48. - # we only need to check for the newsfragment if it's a PR build
  49. if: type = pull_request
  50. python: 3.6
  51. env: TOX_ENV=check-newsfragment
  52. script:
  53. - git remote set-branches --add origin develop
  54. - git fetch origin develop
  55. - tox -e $TOX_ENV
  56. install:
  57. - pip install tox
  58. script:
  59. - tox -e $TOX_ENV