Skip to content

Commit

Permalink
CI test cloudpickle against python3.8 with hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreglaser committed Mar 11, 2019
1 parent 0ae2aed commit 976203d
Showing 1 changed file with 47 additions and 28 deletions.
75 changes: 47 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@ dist: xenial

matrix:
include:
- os: windows
language: sh
env: PYTHON_ROOT="/c/Python37" PYTHON_CHOCO_PKG="python3"
- os: windows
language: sh
env: PYTHON_ROOT="/c/Python27" PYTHON_CHOCO_PKG="python2"
# - os: windows
# language: sh
# env: PYTHON_ROOT="/c/Python37" PYTHON_CHOCO_PKG="python3"
# - os: windows
# language: sh
# env: PYTHON_ROOT="/c/Python27" PYTHON_CHOCO_PKG="python2"
# - os: linux
# dist: trusty
# python: "pypy3"
# - os: linux
# python: 3.7
# - os: linux
# python: 3.6
# - os: linux
# python: 3.5
# - os: linux
# python: 2.7
- os: linux
dist: trusty
python: "pypy3"
- os: linux
python: 3.7
- os: linux
python: 3.6
- os: linux
python: 3.5
- os: linux
python: 2.7
# running python 3.8
env: BUILD_PY_FROM_SOURCE=1
- os: linux
# The PROJECT environment variable refers to a downstream project that
# depends on cloudpickle (for example: distributed, joblib, loky). For
Expand Down Expand Up @@ -54,34 +57,50 @@ before_install:
export PATH="$PYTHON_ROOT:$PYTHON_ROOT/Scripts:$PATH";
python -m pip install --upgrade pip;
fi
- if [[ "$BUILD_PY_FROM_SOURCE" == 1 ]]; then
export VENV_DIR="$HOME/python38";
pushd ..;
git clone https://github.com/pierreglaser/cpython.git;
pushd cpython;
git checkout add-global-hook;
./configure;
make;
./python -m venv "$VENV_DIR";
popd;
popd;
export PYTHON_EXE="$VENV_DIR/bin/python";
else
export PYTHON_EXE="python";
fi

install:
- pip install .
- pip install --upgrade -r dev-requirements.txt
- pip install tornado
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then
pip install numpy scipy;
- $PYTHON_EXE -m pip install .
- $PYTHON_EXE -m pip install --upgrade -r dev-requirements.txt
- $PYTHON_EXE -m pip install tornado
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* && "$BUILD_PY_FROM_SOURCE" != 1 ]]; then
$PYTHON_EXE -m pip install numpy scipy;
fi
- if [[ $PROJECT != "" ]]; then
pip install $TEST_REQUIREMENTS;
$PYTHON_EXE -m pip install $TEST_REQUIREMENTS;
pushd ..;
git clone $PROJECT_URL;
if [[ $PROJECT == "joblib" ]]; then
pushd joblib/joblib/externals;
source vendor_cloudpickle.sh ../../../cloudpickle;
popd;
fi;
pip install ./$PROJECT;
$PYTHON_EXE -m pip install ./$PROJECT;
popd;
fi
- pip list
- $PYTHON_EXE -m pip list
before_script:
# stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
- $PYTHON_EXE -m flake8 . --count --verbose --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- python ci/install_coverage_subprocess_pth.py
- $PYTHON_EXE -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- $PYTHON_EXE ci/install_coverage_subprocess_pth.py
script:
- COVERAGE_PROCESS_START="$TRAVIS_BUILD_DIR/.coveragerc" PYTHONPATH='.:tests' pytest -r s
- COVERAGE_PROCESS_START="$TRAVIS_BUILD_DIR/.coveragerc" PYTHONPATH='.:tests' $PYTHON_EXE -m pytest -r s
- |
if [[ $PROJECT != "" ]]; then
pushd ../$PROJECT
Expand Down

0 comments on commit 976203d

Please sign in to comment.