blob: b87e8a4b94df64c98d71d42d5e2b80293bc3bbaa [file] [log] [blame]
# we only CI the master, release branches, tags and PRs
if: tag IS present OR type = pull_request OR ((branch = master OR branch =~ release-*) AND type = push)
language: python
# cache package wheels (1 cache per python version)
cache: pip
# newer python versions are available only on xenial (while some older only on trusty) Ubuntu distribution
dist: xenial
env:
TOXENV=py
EXTRA_ARGS="-n 12"
TEST_MYPYC=0
jobs:
include:
# Specifically request 3.5.1 because we need to be compatible with that.
- name: "run test suite with python 3.5.1"
python: 3.5.1
dist: trusty
- name: "run test suite with python 3.6"
python: 3.6 # 3.6.3 pip 9.0.1
- name: "run test suite with python 3.7"
python: 3.7 # 3.7.0 pip 10.0.1
- name: "run test suite with python 3.5.1 (new semantic analyzer)"
python: 3.5.1
dist: trusty
env:
- TOXENV=py
- EXTRA_ARGS="-n 12"
- NEWSEMANAL=1
- name: "run test suite with python 3.7 (new semantic analyzer)"
python: 3.7
env:
- TOXENV=py
- EXTRA_ARGS="-n 12"
- NEWSEMANAL=1
- name: "run test suite with python 3.7 (compiled with mypyc)"
python: 3.7
env:
- TOXENV=py
- EXTRA_ARGS="-n 12"
- TEST_MYPYC=1
# - name: "run test suite with python 3.8-dev"
# python: 3.8-dev
- name: "type check our own code"
python: 3.7
env:
- TOXENV=type
- EXTRA_ARGS=
- name: "check code style with flake8"
python: 3.7
env:
- TOXENV=lint
- EXTRA_ARGS=
- name: "trigger a build of wheels"
python: 3.7
script: if [[ ($TRAVIS_BRANCH = "master" || $TRAVIS_BRANCH =~ release-*) && $TRAVIS_PULL_REQUEST = "false" ]]; then ./misc/trigger_wheel_build.sh; fi
- name: "check documentation build"
python: 3.7
env:
- TOXENV=docs
# Disabled because of some pip bug? See #6716
# - name: "check dev environment builds"
# python: 3.7
# env:
# - TOXENV=dev
# - EXTRA_ARGS=
install:
- pip install -U pip setuptools
- pip install -U tox==3.9.0
- tox --notest
# This is a big hack and only works because the layout of our directories
# means that tox picks up the mypy from the source directories instead of
# the version it installed into a venv. This is also *why* we need to do this,
# since if we arranged for tox to build with mypyc, pytest wouldn't use it.
- if [[ $TEST_MYPYC == 1 ]]; then pip install -r mypyc-requirements.txt; CC=clang MYPYC_OPT_LEVEL=0 python3 setup.py --use-mypyc build_ext --inplace; fi
script:
- tox -- $EXTRA_ARGS