-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No tests yet though :(
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 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,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 |