forked from nipreps/smriprep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (52 loc) · 1.34 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
os: linux
dist: bionic
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- 3.6
- 3.7
- 3.8
env:
global:
- CHECK_TYPE="test"
- INSTALL_DEPENDS="pip setuptools"
matrix:
include:
- python: 3.6
env: CHECK_TYPE="style"
before_install:
- python -m pip install --upgrade virtualenv
- python -m virtualenv --python=python /tmp/venv
- source /tmp/venv/bin/activate
- which python
- python --version
- python -m pip --version
- python -m pip install --upgrade $INSTALL_DEPENDS
- python -m pip --version
install:
- travis_retry python -m pip install .
- |
INTENDED_VERSION="$(python -c 'import versioneer; print(versioneer.get_version())')"
pushd /tmp
INSTALLED_VERSION="$(python -c 'import smriprep; print(smriprep.__version__)')"
python -c 'import smriprep; print(smriprep.__file__)'
echo "Intended: $INTENDED_VERSION"
echo "Installed: $INSTALLED_VERSION"
test "$INTENDED_VERSION" == "$INSTALLED_VERSION"
popd
before_script:
- travis_retry python -m pip install .[$CHECK_TYPE]
script:
- |
if [ "$CHECK_TYPE" == "style" ]; then
flake8 smriprep
elif [ "$CHECK_TYPE" == "test" ]; then
pytest -v --cov smriprep --cov-report xml:cov.xml smriprep
else
false
fi
after_script:
- python -m pip install codecov
- codecov