Skip to content

Commit def2c63

Browse files
gaborbernatgvanrossum
authored andcommitted
CI upgrades (Travis and AppVeyor) (#5417)
- Travis test with python3.7 and python3.8-dev - Travis use tox to setup/run tests - Bump tox default envs from python3.6 to python3.7 - specify build dependency and ensure latest pip in Travis - name jobs and comment on distrubution usage for them - AppVeyor run with tox and Python 3.7.x
1 parent e14c2ff commit def2c63

File tree

5 files changed

+54
-25
lines changed

5 files changed

+54
-25
lines changed

.travis.yml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
1-
sudo: false
1+
if: tag IS present OR type = pull_request OR (branch = master AND type = push) # we only CI the master, tags and PRs
2+
23
language: python
34
# cache package wheels (1 cache per python version)
45
cache: pip
5-
python:
6-
- "3.4"
6+
# newer python versions are available only on xenial (while some older only on trusty) Ubuntu distribution
7+
dist: xenial
8+
sudo: required
9+
10+
env:
11+
TOXENV=py
12+
EXTRA_ARGS="-n 12"
13+
14+
jobs:
15+
include:
16+
- name: "run test suite with python 3.4"
17+
python: 3.4
18+
dist: trusty
719
# Specifically request 3.5.1 because we need to be compatible with that.
8-
- "3.5.1"
9-
- "3.6"
10-
- "3.7-dev"
20+
- name: "run test suite with python 3.5.1"
21+
python: 3.5.1
22+
dist: trusty
23+
- name: "run test suite with python 3.6"
24+
python: 3.6 # 3.6.3 pip 9.0.1
25+
- name: "run test suite with python 3.7"
26+
python: 3.7 # 3.7.0 pip 10.0.1
27+
- name: "run test suite with python 3.8-dev"
28+
python: 3.8-dev
29+
- name: "type check our own code"
30+
python: 3.7
31+
env:
32+
- TOXENV=type
33+
- EXTRA_ARGS=
34+
- name: "check code style with flake8"
35+
python: 3.7
36+
env:
37+
- TOXENV=lint
38+
- EXTRA_ARGS=
1139

1240
install:
13-
- pip install -U pip setuptools wheel
14-
- pip install -r test-requirements.txt
15-
- python2 -m pip install --user typing
16-
- pip install .
41+
- pip install -U pip setuptools
42+
- pip install -U tox
43+
- tox --notest
1744

1845
script:
19-
- pytest -n12
20-
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then flake8 -j12; fi
21-
- if [[ $TRAVIS_PYTHON_VERSION == '3.5.1' ]]; then python3 -m mypy --config-file mypy_self_check.ini -p mypy; fi
46+
- tox -- $EXTRA_ARGS

appveyor.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@ cache:
44
environment:
55
matrix:
66

7-
- PYTHON: "C:\\Python36-x64"
8-
PYTHON_VERSION: "3.6.x"
7+
- PYTHON: "C:\\Python37-x64"
8+
PYTHON_VERSION: "3.7.x"
99
PYTHON_ARCH: "64"
1010

1111
install:
1212
- "git config core.symlinks true"
1313
- "git reset --hard"
14-
- "%PYTHON%\\python.exe -m pip install -r test-requirements.txt"
15-
- "C:\\Python27\\python.exe -m pip install typing"
1614
- "git submodule update --init typeshed"
1715
- "cd typeshed && git config core.symlinks true && git reset --hard && cd .."
18-
- "%PYTHON%\\python.exe -m pip install ."
16+
- "%PYTHON%\\python.exe -m pip install -U setuptools tox"
17+
- "%PYTHON%\\python.exe -m tox -e py37 --notest"
1918

2019
build: off
2120

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

2624
skip_commits:
2725
files:

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
requires = [
3+
"setuptools >= 30.0.2",
4+
"wheel >= 0.29.0"
5+
]

test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ attrs>=18.0
22
flake8
33
flake8-bugbear; python_version >= '3.5'
44
flake8-pyi; python_version >= '3.6'
5-
lxml==4.2.3
5+
lxml==4.2.4
66
psutil==5.4.0
77
pytest>=3.4
88
pytest-xdist>=1.22

tox.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,30 @@ envlist = py34,
1111

1212
[testenv]
1313
description = run the test driver with {basepython}
14+
passenv = PYTEST_XDIST_WORKER_COUNT
1415
deps = -rtest-requirements.txt
1516
commands = pytest {posargs}
1617

1718
[testenv:lint]
1819
description = check the code style
19-
basepython = python3.6
20+
basepython = python3.7
2021
commands = flake8 -j0 {posargs}
2122

2223
[testenv:type]
2324
description = type check ourselves
24-
basepython = python3.6
25+
basepython = python3.7
2526
commands = python3 -m mypy --config-file mypy_self_check.ini -p mypy
2627

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

3334
[testenv:dev]
3435
description = generate a DEV environment, that has all project libraries
3536
usedevelop = True
36-
basepython = python3.6
37+
basepython = python3.7
3738
deps = -rtest-requirements.txt
3839
-rdocs/requirements-docs.txt
3940
commands = python -m pip list --format=columns

0 commit comments

Comments
 (0)