Skip to content

Commit 976203d

Browse files
committed
CI test cloudpickle against python3.8 with hooks
1 parent 0ae2aed commit 976203d

File tree

1 file changed

+47
-28
lines changed

1 file changed

+47
-28
lines changed

Diff for: .travis.yml

+47-28
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@ dist: xenial
33

44
matrix:
55
include:
6-
- os: windows
7-
language: sh
8-
env: PYTHON_ROOT="/c/Python37" PYTHON_CHOCO_PKG="python3"
9-
- os: windows
10-
language: sh
11-
env: PYTHON_ROOT="/c/Python27" PYTHON_CHOCO_PKG="python2"
6+
# - os: windows
7+
# language: sh
8+
# env: PYTHON_ROOT="/c/Python37" PYTHON_CHOCO_PKG="python3"
9+
# - os: windows
10+
# language: sh
11+
# env: PYTHON_ROOT="/c/Python27" PYTHON_CHOCO_PKG="python2"
12+
# - os: linux
13+
# dist: trusty
14+
# python: "pypy3"
15+
# - os: linux
16+
# python: 3.7
17+
# - os: linux
18+
# python: 3.6
19+
# - os: linux
20+
# python: 3.5
21+
# - os: linux
22+
# python: 2.7
1223
- os: linux
13-
dist: trusty
14-
python: "pypy3"
15-
- os: linux
16-
python: 3.7
17-
- os: linux
18-
python: 3.6
19-
- os: linux
20-
python: 3.5
21-
- os: linux
22-
python: 2.7
24+
# running python 3.8
25+
env: BUILD_PY_FROM_SOURCE=1
2326
- os: linux
2427
# The PROJECT environment variable refers to a downstream project that
2528
# depends on cloudpickle (for example: distributed, joblib, loky). For
@@ -54,34 +57,50 @@ before_install:
5457
export PATH="$PYTHON_ROOT:$PYTHON_ROOT/Scripts:$PATH";
5558
python -m pip install --upgrade pip;
5659
fi
60+
- if [[ "$BUILD_PY_FROM_SOURCE" == 1 ]]; then
61+
export VENV_DIR="$HOME/python38";
62+
pushd ..;
63+
git clone https://github.com/pierreglaser/cpython.git;
64+
pushd cpython;
65+
git checkout add-global-hook;
66+
./configure;
67+
make;
68+
./python -m venv "$VENV_DIR";
69+
popd;
70+
popd;
71+
export PYTHON_EXE="$VENV_DIR/bin/python";
72+
else
73+
export PYTHON_EXE="python";
74+
fi
75+
5776
install:
58-
- pip install .
59-
- pip install --upgrade -r dev-requirements.txt
60-
- pip install tornado
61-
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then
62-
pip install numpy scipy;
77+
- $PYTHON_EXE -m pip install .
78+
- $PYTHON_EXE -m pip install --upgrade -r dev-requirements.txt
79+
- $PYTHON_EXE -m pip install tornado
80+
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* && "$BUILD_PY_FROM_SOURCE" != 1 ]]; then
81+
$PYTHON_EXE -m pip install numpy scipy;
6382
fi
6483
- if [[ $PROJECT != "" ]]; then
65-
pip install $TEST_REQUIREMENTS;
84+
$PYTHON_EXE -m pip install $TEST_REQUIREMENTS;
6685
pushd ..;
6786
git clone $PROJECT_URL;
6887
if [[ $PROJECT == "joblib" ]]; then
6988
pushd joblib/joblib/externals;
7089
source vendor_cloudpickle.sh ../../../cloudpickle;
7190
popd;
7291
fi;
73-
pip install ./$PROJECT;
92+
$PYTHON_EXE -m pip install ./$PROJECT;
7493
popd;
7594
fi
76-
- pip list
95+
- $PYTHON_EXE -m pip list
7796
before_script:
7897
# stop the build if there are Python syntax errors or undefined names
79-
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
98+
- $PYTHON_EXE -m flake8 . --count --verbose --select=E901,E999,F821,F822,F823 --show-source --statistics
8099
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
81-
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
82-
- python ci/install_coverage_subprocess_pth.py
100+
- $PYTHON_EXE -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
101+
- $PYTHON_EXE ci/install_coverage_subprocess_pth.py
83102
script:
84-
- COVERAGE_PROCESS_START="$TRAVIS_BUILD_DIR/.coveragerc" PYTHONPATH='.:tests' pytest -r s
103+
- COVERAGE_PROCESS_START="$TRAVIS_BUILD_DIR/.coveragerc" PYTHONPATH='.:tests' $PYTHON_EXE -m pytest -r s
85104
- |
86105
if [[ $PROJECT != "" ]]; then
87106
pushd ../$PROJECT

0 commit comments

Comments
 (0)