-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
96 additions
and
26 deletions.
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 |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# vim ft=yaml | ||
dist: xenial | ||
sudo: true | ||
language: python | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
|
||
python: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
|
||
env: | ||
global: | ||
- CHECK_TYPE="install" | ||
- INSTALL_TYPE="pip" | ||
- INSTALL_DEPENDS="pip setuptools" | ||
matrix: | ||
- CHECK_TYPE="style" | ||
- CHECK_TYPE="test" | ||
- INSTALL_TYPE="sdist" | ||
- INSTALL_TYPE="wheel" | ||
- INSTALL_DEPENDS="pip==18.1 setuptools==30.2.1" | ||
- INSTALL_DEPENDS="pip==10.0.1 setuptools==30.4.0" | ||
|
||
matrix: | ||
exclude: | ||
- python: 3.7 | ||
env: CHECK_TYPE="style" | ||
allow_failures: | ||
- python: 3.6 | ||
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.4.0" | ||
- python: 3.7 | ||
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.4.0" | ||
- python: 3.8 | ||
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.4.0" | ||
|
||
before_install: | ||
- python -m pip install --upgrade pip virtualenv | ||
- virtualenv --python=python /tmp/venv | ||
- source /tmp/venv/bin/activate | ||
- python --version | ||
- python -m pip --version | ||
- python -m pip install --upgrade $INSTALL_DEPENDS | ||
- python -m pip --version | ||
- | | ||
if [ "$INSTALL_TYPE" == "pip" ]; then | ||
PACKAGE="-e ." | ||
elif [ "$INSTALL_TYPE" == "sdist" ]; then | ||
python setup.py sdist | ||
PACKAGE="$( ls dist/*.tar.gz )" | ||
elif [ "$INSTALL_TYPE" == "wheel" ]; then | ||
python setup.py bdist_wheel | ||
PACKAGE="$( ls dist/*.whl )" | ||
fi | ||
install: | ||
- python -m pip install $PACKAGE | ||
- | | ||
INTENDED_VERSION="$(python -c 'import versioneer; print(versioneer.get_version())')" | ||
pushd /tmp | ||
INSTALLED_VERSION="$(python -c 'import nirodents; print(nirodents.__version__)')" | ||
python -c 'import nirodents; print(nirodents.__file__)' | ||
echo "Intended: $INTENDED_VERSION" | ||
echo "Installed: $INSTALLED_VERSION" | ||
test "$INTENDED_VERSION" == "$INSTALLED_VERSION" | ||
popd | ||
- if [ "$CHECK_TYPE" = "install" ]; then exit 0; fi | ||
|
||
before_script: | ||
- travis_retry python -m pip install "nirodents[$CHECK_TYPE]" | ||
- | | ||
if [ "$CHECK_TYPE" == "test" ]; then | ||
mkdir -p $HOME/.cache/stanford-crn | ||
curl -sSL "http://github.com/chrisfilo/BIDS-examples-1/archive/enh/ds054.tar.gz" | | ||
tar xvzf - -C $HOME/.cache/stanford-crn | ||
curl -sSL "https://files.osf.io/v1/resources/fvuh8/providers/osfstorage/57f328f6b83f6901ef94cf70" | | ||
tar xvzf - -C $HOME/.cache/stanford-crn | ||
fi | ||
script: | ||
- | | ||
if [ "$CHECK_TYPE" == "style" ]; then | ||
flake8 nirodents | ||
elif [ "$CHECK_TYPE" == "test" ]; then | ||
pytest -n 2 -v --cov nirodents --cov-report xml:cov.xml \ | ||
--ignore=nirodents/interfaces/ants.py nirodents | ||
else | ||
false | ||
fi | ||
after_script: | ||
- python -m pip install codecov | ||
- python -m codecov --flags travis --file cov.xml -e $TRAVIS_JOB_NUMBER |
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