Skip to content

CI upgrades #5417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 38 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,46 @@
sudo: false
if: tag IS present OR type = pull_request OR (branch = master AND type = push) # we only CI the master, tags and PRs

language: python
# cache package wheels (1 cache per python version)
cache: pip
python:
- "3.4"
# newer python versions are available only on xenial (while some older only on trusty) Ubuntu distribution
dist: xenial
sudo: required

env:
TOXENV=py
EXTRA_ARGS="-n 12"

jobs:
include:
- name: "run test suite with python 3.4"
python: 3.4
dist: trusty
# Specifically request 3.5.1 because we need to be compatible with that.
- "3.5.1"
- "3.6"
- "3.7-dev"
- 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.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=

install:
- pip install -U pip setuptools wheel
- pip install -r test-requirements.txt
- python2 -m pip install --user typing
- pip install .
- pip install -U pip setuptools
- pip install -U tox
- tox --notest

script:
- pytest -n12
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then flake8 -j12; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.5.1' ]]; then python3 -m mypy --config-file mypy_self_check.ini -p mypy; fi
- tox -- $EXTRA_ARGS
12 changes: 5 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@ cache:
environment:
matrix:

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"

install:
- "git config core.symlinks true"
- "git reset --hard"
- "%PYTHON%\\python.exe -m pip install -r test-requirements.txt"
- "C:\\Python27\\python.exe -m pip install typing"
- "git submodule update --init typeshed"
- "cd typeshed && git config core.symlinks true && git reset --hard && cd .."
- "%PYTHON%\\python.exe -m pip install ."
- "%PYTHON%\\python.exe -m pip install -U setuptools tox"
- "%PYTHON%\\python.exe -m tox -e py37 --notest"

build: off

test_script:
# lint and mypy self check run in Travis
- "%PYTHON%\\python.exe -m pytest -k \"not (PythonEvaluationSuite and python2)\""
- "%PYTHON%\\python.exe -m tox -e py37"

skip_commits:
files:
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
requires = [
"setuptools >= 30.0.2",
"wheel >= 0.29.0"
]
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ attrs>=18.0
flake8
flake8-bugbear; python_version >= '3.5'
flake8-pyi; python_version >= '3.6'
lxml==4.2.3
lxml==4.2.4
psutil==5.4.0
pytest>=3.4
pytest-xdist>=1.22
Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,30 @@ envlist = py34,

[testenv]
description = run the test driver with {basepython}
passenv = PYTEST_XDIST_WORKER_COUNT
deps = -rtest-requirements.txt
commands = pytest {posargs}

[testenv:lint]
description = check the code style
basepython = python3.6
basepython = python3.7
commands = flake8 -j0 {posargs}

[testenv:type]
description = type check ourselves
basepython = python3.6
basepython = python3.7
commands = python3 -m mypy --config-file mypy_self_check.ini -p mypy

[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.6
basepython = python3.7
deps = -rdocs/requirements-docs.txt
commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -W -bhtml {posargs}

[testenv:dev]
description = generate a DEV environment, that has all project libraries
usedevelop = True
basepython = python3.6
basepython = python3.7
deps = -rtest-requirements.txt
-rdocs/requirements-docs.txt
commands = python -m pip list --format=columns
Expand Down