forked from templateflow/python-client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
80 lines (73 loc) · 2.04 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# vim ft=yaml
dist: xenial
sudo: true
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- 3.5
- 3.6
- 3.7
env:
global:
- CHECK_TYPE="install"
- INSTALL_TYPE="pip"
- INSTALL_DEPENDS="pip setuptools"
matrix:
- CHECK_TYPE="style"
- INSTALL_TYPE="install"
- INSTALL_TYPE="develop"
- INSTALL_TYPE="sdist"
- INSTALL_TYPE="wheel"
- INSTALL_DEPENDS="pip==18.1 setuptools==30.2.1"
- INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
matrix:
exclude:
- python: 3.7
env: CHECK_TYPE="style"
allow_failures:
- python: 3.5
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
- python: 3.6
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
- python: 3.7
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
before_install:
- python -m pip install --upgrade $INSTALL_DEPENDS
- pip install "flake8<3.0" flake8-putty
install:
- |
if [ "$INSTALL_TYPE" == "install" ]; then
python setup.py install
elif [ "$INSTALL_TYPE" == "develop" ]; then
python setup.py develop
elif [ "$INSTALL_TYPE" == "pip" ]; then
pip 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
fi
- |
if [ "$CHECK_TYPE" == "style" ]; then
travis_retry pip install "flake8<3.0" flake8-putty
fi
script:
- |
if [ "$CHECK_TYPE" == "style" ]; then
flake8 templateflow
elif [ "$CHECK_TYPE" == "install" ]; then
INTENDED_VERSION="$(python -c 'import versioneer; print(versioneer.get_version())')"
mkdir for_testing
cd for_testing
INSTALLED_VERSION="$(python -c 'import templateflow; print(templateflow.__version__)')"
python -c 'import templateflow; print(templateflow.__file__)'
echo "Intended: $INTENDED_VERSION"
echo "Installed: $INSTALLED_VERSION"
test "$INTENDED_VERSION" == "$INSTALLED_VERSION"
else
false
fi