Skip to content

Commit

Permalink
[TEST] Basic .travis.yml
Browse files Browse the repository at this point in the history
No tests yet though :(
  • Loading branch information
rmarkello committed Nov 10, 2019
1 parent 7b40cf0 commit 75611ba
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
language: python
sudo: false
dist: xenial
services:
- xvfb
notifications:
email: change

python:
- 3.6
- 3.7

env:
matrix:
- CHECK_TYPE=linting
- CHECK_TYPE=docdoctest
- CHECK_TYPE=test
global:
- INSTALL_TYPE=setup

matrix:
include:
- python: 3.6
env:
- INSTALL_TYPE=sdist
- CHECK_TYPE=test
- python: 3.6
env:
- INSTALL_TYPE=wheel
- CHECK_TYPE=test

before_install:
- python -m pip install --upgrade pip
- if [ "${CHECK_TYPE}" == "linting" ]; then
pip install flake8;
fi
- if [ "${CHECK_TYPE}" == "test" ]; then
pip install "pytest>=3.6" pytest-cov coverage coveralls codecov;
fi
- if [ "${CHECK_TYPE}" == "docdoctest" ]; then
pip install "sphinx>2.0" sphinx_rtd_theme pandas sphinx-argparse;
fi

install:
- |
if [ "${INSTALL_TYPE}" == "setup" ]; then
python setup.py install;
elif [ "${INSTALL_TYPE}" == "sdist" ]; then
python setup.py sdist;
pip install dist/*.tar.gz;
elif [ "${INSTALL_TYPE}" == "wheel" ]; then
python setup.py bdist_wheel;
pip install dist/*.whl;
else
false;
fi
script:
- |
if [ "${CHECK_TYPE}" == "linting" ]; then
flake8 phys2bids;
elif [ "${CHECK_TYPE}" == "docdoctest" ]; then
cd docs;
pip install -r ./requirements.txt;
make html;
make doctest;
elif [ "${CHECK_TYPE}" == "test" ]; then
mkdir for_testing && cd for_testing;
cp ../setup.cfg ./;
args="--doctest-modules --cov-report term-missing --cov=phys2bids --pyargs"
python -m pytest ${args} phys2bids;
else
false;
fi
after_success:
- if [ "${CHECK_TYPE}" == "test" ]; then
coveralls; codecov;
fi

0 comments on commit 75611ba

Please sign in to comment.