aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 38a66f32152e8021bd86e1745eb5ab287961bff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
dist: xenial
language: python

jobs:
  fast_finish: true
  include:
  - &latest_py2
    python: 2.7
    env: TOXENV=py27
  - <<: *latest_py2
    env: LANG=C TOXENV=py27
  - python: pypy3
    env: DISABLE_COVERAGE=1  # Don't run coverage on pypy (too slow).
  - python: 3.5
  - python: 3.6
  - python: 3.7
  - &latest_py3
    python: 3.8
  - <<: *latest_py3
    env: LANG=C
  - python: 3.8-dev
  - <<: *latest_py3
    env: TOXENV=docs DISABLE_COVERAGE=1
  - <<: *latest_py3
    stage: deploy
    if: tag IS present
    script: tox -e release
    after_success: skip
  allow_failures:
  # suppress failures due to pypa/setuptools#2000
  - python: pypy3

cache: pip

install:

# ensure we have recent pip/setuptools/wheel
- pip install --disable-pip-version-check --upgrade pip setuptools wheel
# need tox to get started
- pip install --upgrade tox tox-venv

# Output the env, to verify behavior
- pip freeze --all
- env

- "! grep pyc setuptools.egg-info/SOURCES.txt"

script:
  - export NETWORK_REQUIRED=1
  - |
    ( # Run testsuite.
      if [ -z "$DISABLE_COVERAGE" ]
      then
        tox -- --cov
      else
        tox
      fi
    )

after_success:
  - |
    ( # Upload coverage data.
      if [ -z "$DISABLE_COVERAGE" ]
      then
        export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME
        tox -e coverage,codecov
      fi
    )