-
Notifications
You must be signed in to change notification settings - Fork 45
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
Refactor CI configuration to use tox and Azure Pipelines for everything #229
Merged
Merged
Changes from all commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
28a32ed
test windows ci
pierreglaser b683b8b
MNT dont use coverage 5 (bug with sqlite)
pierreglaser 6fa8769
CI trigger
pierreglaser d8da31c
MNT pin codecov when uploading results, comments
pierreglaser 5619a82
FIX pin one last coverage install
pierreglaser ae1de32
fix weird command misinterpretation
pierreglaser 3ad4ae0
FIX dont use sqlite with coverage
pierreglaser 3490ba5
try with set
pierreglaser 65b5378
try to use the old json legacy format storing
pierreglaser 59b35e8
FIX try activating the testenv during upload
pierreglaser df95363
FIX try adding conda init bash
pierreglaser fbcd455
move back to batch upload script
pierreglaser 3ccde6f
increase upload_codecov.[sh, cmd] verbosity
pierreglaser f550912
MNT revert unnecessary changes
pierreglaser bb30247
FIX remove stale comments
pierreglaser 453955d
CI test which plaform is used on Window's bash
pierreglaser 57ace6d
FIX add conda to path before
pierreglaser 0111ae7
FIX remove spurious duplicate
pierreglaser 2f1fde9
CI use tox inside Windows CI
pierreglaser ebec69f
FIX use bash entries instead of script
pierreglaser a7e1279
FIX dont isolate tox from test environment (temp)
pierreglaser dae070c
FIX use tox.env python version for tox
pierreglaser 5fc524c
FIX pass the skip-high-memory flag
pierreglaser 94cff19
CI use recommended way to upload to codecov
pierreglaser 4fefd13
FIX dont rely on OS-specific bash syntax
pierreglaser 0f27385
run only a few tests to speed up debugging
pierreglaser edcb81f
FIX use bash directive directly
pierreglaser 6ad76ef
FIX try naive coverage installation
pierreglaser 82e3bba
FIX try smarter way to note re-install coverage
pierreglaser ad07eb4
FIX typo in py35 env
pierreglaser 20ffcc6
MNT prepare linux integration into azure-pipelines
pierreglaser 959b154
FIX pass correctly the imageName
pierreglaser c5126fa
CI integrate linux into azure pipelines
pierreglaser abf2f25
FIX spurious LOKY_MAX_DEPTH add
pierreglaser 9591af8
CLN remove outdated bash/cmd CI files
pierreglaser 6ac8c1e
CLN remove other outdated scripts
pierreglaser 61d96ae
CI add macos to azure-pipelines
pierreglaser f37e169
CI add pypy to azure-pipelines CI
pierreglaser df1fd90
FIX typo
pierreglaser 35bfefa
CLN remove pypy from travis
pierreglaser 2fb3daf
CI unify the test command to migrate fully to azure
pierreglaser e1523ab
FIX travis leftovers
pierreglaser a8ebb14
WIP debug
pierreglaser fc06a0a
FIX use tox_env env var
pierreglaser 4ae0677
FIX dont test docker-related issues on windows
pierreglaser fe2d784
CLN remove .travis.yml (!!!!)
pierreglaser 2643829
CI add final matrix entries (testing joblib etc.)
pierreglaser da67b85
FIX change style of matrix entries variable
pierreglaser fb60831
revert style changing, add missing python.version
pierreglaser 96cd03e
FIX EOD silly mistakes
pierreglaser 3d3cc69
WIP debug
pierreglaser a4c8a53
Fix use correct predefined env vars
pierreglaser 870a413
FIX fix
pierreglaser af2a322
FIX use correct environment variable
pierreglaser 44d8577
FIX install pytest
pierreglaser e59f465
add threadpoolctl
pierreglaser d57bc77
Merge branch 'master' into test-windows-ci-error
pierreglaser 4e9bb69
correctly pass PYTEST_ARGS
pierreglaser 0dfdbc8
CLN env var cleanups
pierreglaser dd85324
CLN style, unused variables, revert useless changes.
pierreglaser a0ec4d3
FIX wrong quote enclosing
pierreglaser 2974613
CI run the joblib test suite inside a venv
pierreglaser 5a52079
FIX typos, leftover debug code
pierreglaser e4c8252
CLN collapse template into .azure-pipelines.yml
pierreglaser db0e5ab
FIX add matrix in strategy entry
pierreglaser 85c4423
FIX matrix outside of parameters
pierreglaser 2b1980b
FIX, CLN remove completely parameters entry
pierreglaser c525f5e
FIX correct job name
pierreglaser 8656b49
CI run the actual steps of the CI
pierreglaser 559f7c7
Do not install numpy for the PyPy tests
ogrisel ec787bc
Run Python 3.8 and reorg order
ogrisel 4ba3527
Cleanup
ogrisel 36ae876
Update tox.ini: py38 / passenv / remove basepython
ogrisel f956a0b
Move some env vars defs into tox.ini
ogrisel fc1a7cc
Update badge
ogrisel 605f3c0
Small fixes
ogrisel 1f3cb7a
Try to generate language independent coverage report
ogrisel 0edcae7
Do not prefetch docker image when not necessary
ogrisel ceaef5e
Comment out failing loky test on python 3.8 for now
ogrisel f6f3d1e
Display number of detected CPUs
ogrisel 0d0a439
CI trigger
pierreglaser 486ccb3
explicitly pass filename to prevent discovering errors
pierreglaser 3ebc9a9
Override git bash used in windows
pierreglaser 09874f5
fix
pierreglaser efd9cd8
try another syntax
pierreglaser f27fe6e
CI trigger
pierreglaser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,100 @@ | ||
# Adapted from https://github.com/pandas-dev/pandas/blob/master/azure-pipelines.yml | ||
jobs: | ||
|
||
- template: continuous_integration/azure/windows.yml | ||
parameters: | ||
name: Windows | ||
vmImage: vs2017-win2016 | ||
- job: 'test_loky' | ||
strategy: | ||
matrix: | ||
py37_conda: | ||
VERSION_PYTHON: '3.7' | ||
PACKAGER: 'conda' | ||
py36_pip: | ||
VERSION_PYTHON: '3.6' | ||
PACKAGER: 'pip' | ||
py35_conda: | ||
VERSION_PYTHON: '3.5' | ||
PACKAGER: 'conda' | ||
py27_pip: | ||
VERSION_PYTHON: '2.7' | ||
PACKAGER: 'pip' | ||
|
||
# windows-py38: | ||
# imageName: "vs2017-win2016" | ||
# python.version: "3.8" | ||
# tox.env: py38 | ||
windows-py35: | ||
imageName: "vs2017-win2016" | ||
python.version: "3.5" | ||
tox.env: py35 | ||
windows-py27: | ||
imageName: "vs2017-win2016" | ||
python.version: "2.7" | ||
tox.env: py27 | ||
|
||
# macos-py38: | ||
# imageName: "macos-10.13" | ||
# python.version: "3.8" | ||
# tox.env: py38 | ||
macos-py35: | ||
imageName: "macos-10.13" | ||
python.version: "3.5" | ||
tox.env: py35 | ||
macos-py27-high-memory: | ||
imageName: "macos-10.13" | ||
python.version: "2.7" | ||
tox.env: py27 | ||
RUN_MEMORY: "true" | ||
|
||
linux-pypy3: | ||
imageName: "ubuntu-16.04" | ||
python.version: "pypy3" | ||
tox.env: pypy3 | ||
LOKY_MAX_CPU_COUNT: "2" | ||
|
||
linux-py38-joblib-tests: | ||
imageName: "ubuntu-16.04" | ||
python.version: "3.8" | ||
tox.env: "py38" | ||
JOBLIB_TESTS: "true" | ||
# linux-py38-high-memory: | ||
# imageName: "ubuntu-16.04" | ||
# python.version: "3.8" | ||
# tox.env: py38 | ||
# RUN_MEMORY: "true" | ||
linux-py37: | ||
imageName: "ubuntu-16.04" | ||
python.version: "3.7" | ||
tox.env: py37 | ||
linux-py36: | ||
imageName: "ubuntu-16.04" | ||
python.version: "3.6" | ||
tox.env: py36 | ||
linux-py35: | ||
imageName: "ubuntu-16.04" | ||
python.version: "3.5" | ||
tox.env: py35 | ||
linux-py27: | ||
imageName: "ubuntu-16.04" | ||
python.version: "2.7" | ||
tox.env: py27 | ||
|
||
pool: | ||
vmImage: $(imageName) | ||
variables: | ||
JUNITXML: 'test-data.xml' | ||
PYTEST_ARGS: '-vl --timeout=60 --maxfail=5' | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
displayName: 'Use Python $(python.version)' | ||
# azure-pipelines unpredictably switches between Git\bin\bash and | ||
# Git\usr\bin\bash when running a bash script inside Windows environments. | ||
# The latter may use wrong bash commands, resulting in errors when codecov | ||
# tries to upload the coverage results. | ||
- bash: echo "##vso[task.prependpath]C:/Program Files/Git/bin" | ||
displayName: 'Override Git bash shell for Windows' | ||
condition: eq(variables['Agent.OS'], 'Windows_NT') | ||
|
||
- script: python -m pip install --upgrade tox | ||
displayName: 'Install tox' | ||
|
||
- script: | | ||
bash continuous_integration/runtests.sh | ||
displayName: 'Test loky' | ||
|
||
# - template: build_tools/azure/posix.yml | ||
# parameters: | ||
# name: Linux | ||
# vmImage: ubuntu-16.04 | ||
# matrix: | ||
# # Linux environment to test that scikit-learn can be built against | ||
# # versions of numpy, scipy with ATLAS that comes with Ubuntu Xenial 16.04 | ||
# # i.e. numpy 1.11 and scipy 0.17 | ||
# py35_np_atlas: | ||
# DISTRIB: 'ubuntu' | ||
# PYTHON_VERSION: '3.5' | ||
# SKLEARN_SITE_JOBLIB: '1' | ||
# JOBLIB_VERSION: '0.11' | ||
# # Linux + Python 3.5 build with OpenBLAS and without SITE_JOBLIB | ||
# py35_conda_openblas: | ||
# DISTRIB: 'conda' | ||
# PYTHON_VERSION: '3.5' | ||
# INSTALL_MKL: 'false' | ||
# NUMPY_VERSION: '1.11.0' | ||
# SCIPY_VERSION: '0.17.0' | ||
# CYTHON_VERSION: '*' | ||
# PILLOW_VERSION: '4.0.0' | ||
# COVERAGE: 'true' | ||
# # Linux environment to test the latest available dependencies and MKL. | ||
# # It runs tests requiring pandas and PyAMG. | ||
# # It also runs with the site joblib instead of the vendored copy of joblib. | ||
# pylatest_conda: | ||
# DISTRIB: 'conda' | ||
# PYTHON_VERSION: '*' | ||
# INSTALL_MKL: 'true' | ||
# NUMPY_VERSION: '*' | ||
# SCIPY_VERSION: '*' | ||
# PANDAS_VERSION: '*' | ||
# CYTHON_VERSION: '*' | ||
# PYAMG_VERSION: '*' | ||
# PILLOW_VERSION: '*' | ||
# JOBLIB_VERSION: '*' | ||
# COVERAGE: 'true' | ||
# CHECK_PYTEST_SOFT_DEPENDENCY: 'true' | ||
# TEST_DOCSTRINGS: 'true' | ||
# SKLEARN_SITE_JOBLIB: '1' | ||
# CHECK_WARNINGS: 'true' | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: '$(JUNITXML)' | ||
displayName: 'Publish Test Results' | ||
condition: succeededOrFailed() | ||
|
||
# - template: build_tools/azure/posix.yml | ||
# parameters: | ||
# name: macOS | ||
# vmImage: xcode9-macos10.13 | ||
# matrix: | ||
# pylatest_conda: | ||
# DISTRIB: 'conda' | ||
# PYTHON_VERSION: '*' | ||
# INSTALL_MKL: 'true' | ||
# NUMPY_VERSION: '*' | ||
# SCIPY_VERSION: '*' | ||
# CYTHON_VERSION: '*' | ||
# PILLOW_VERSION: '*' | ||
# JOBLIB_VERSION: '*' | ||
# COVERAGE: 'true' | ||
- bash: | | ||
curl -s https://codecov.io/bash | bash | ||
displayName: 'Upload to codecov' | ||
condition: succeeded() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
33 changes: 17 additions & 16 deletions
33
continuous_integration/travis/runtests.sh → continuous_integration/runtests.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
#!/usr/bin/env sh | ||
# This script is meant to be called by the "script" step defined in | ||
# .travis.yml. See http://docs.travis-ci.com/ for more details. | ||
|
||
# License: 3-clause BSD | ||
|
||
set -e | ||
which $PYTHON | ||
$PYTHON --version | ||
echo $TOXENV | ||
|
||
# Make sure that we have the python docker image cached locally to avoid | ||
# a timeout in a test that needs it. | ||
|
||
if [ "$(which docker)" != "" ]; then | ||
docker pull python:3.6 | ||
fi | ||
which python | ||
python --version | ||
echo ${TOX_ENV} | ||
|
||
if [ "$JOBLIB_TESTS" = "true" ]; then | ||
# Install joblib from pip, patch it to use this version of loky | ||
# and run the joblib tests with pytest. | ||
python -m venv venv/ | ||
source ./venv/bin/activate | ||
which python | ||
git clone https://github.com/joblib/joblib.git src_joblib | ||
cd src_joblib | ||
pip install pytest | ||
pip install threadpoolctl # required by some joblib tests | ||
|
||
pip install -e . | ||
export JOBLIB=`python -c "import joblib; print(joblib.__path__[0])"` | ||
cp $TRAVIS_BUILD_DIR/continuous_integration/travis/copy_loky.sh $JOBLIB/externals | ||
(cd $JOBLIB/externals && bash copy_loky.sh $TRAVIS_BUILD_DIR) | ||
cp "$BUILD_SOURCESDIRECTORY"/continuous_integration/copy_loky.sh $JOBLIB/externals | ||
(cd $JOBLIB/externals && bash copy_loky.sh "$BUILD_SOURCESDIRECTORY") | ||
pytest -vl --ignore $JOBLIB/externals --pyargs joblib | ||
else | ||
# Make sure that we have the python docker image cached locally to avoid | ||
# a timeout in a test that needs it. | ||
if [ "$(which docker)" != "" ] && [ "$(uname)" = "Linux" ]; then | ||
docker pull python:3.6 | ||
fi | ||
|
||
# Run the tests and collect trace coverage data both in the subprocesses | ||
# and its subprocesses. | ||
PYTEST_ARGS="-vl --timeout=60 --maxfail=5" | ||
if [ "$RUN_MEMORY" != "true" ]; then | ||
PYTEST_ARGS="$PYTEST_ARGS --skip-high-memory" | ||
fi | ||
COVERAGE_PROCESS_START="$TRAVIS_BUILD_DIR/.coveragerc" $PYTHON -m tox -- $PYTEST_ARGS | ||
tox -v -e "${TOX_ENV}" -- ${PYTEST_ARGS} --junitxml="${JUNITXML}" | ||
fi |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity please move the
variables
section to the top of the job declaration.