-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
63 lines (58 loc) · 1.87 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
os: linux
language: python
sudo: false
matrix:
include:
- python: 3.6
env: REQUIREMENTS="numpy==1.8.0 pandas==0.20.0rc1" RUN_COVERAGE=true BUILD_DOCS=false INSTALLER="pip"
- python: 3.6
env: REQUIREMENTS="flake8" RUN_FLAKE8=true RUN_COVERAGE=true INSTALLER="pip"
- python: 3.7
env: REQUIREMENTS="numpy pandas tqdm nomkl" RUN_COVERAGE=true BUILD_DOCS=true INSTALLER="conda"
- language: generic
os: osx
python: 3.6
env: PYTHON_VERSION="3.6" REQUIREMENTS="numpy pandas tqdm" RUN_COVERAGE=true INSTALLER="conda"
install:
- |
if [[ "$INSTALLER" == "conda" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl -s -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else
curl -s -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
fi
bash miniconda.sh -b -p $HOME/miniconda && rm miniconda.sh
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda update conda -y
conda create -y -n neurtu-env ${REQUIREMENTS} pytest-cov pytest==3.7.2 python=${PYTHON_VERSION}
source activate neurtu-env
pip install codecov pytest-cov
else
pip install ${REQUIREMENTS} pytest-cov codecov pytest==3.7.2
fi
- pip install -e .
script:
- |
if [[ "${RUN_FLAKE8}" == true ]]; then
flake8 --exclude=neurtu/externals/ neurtu/
fi
- |
if [[ "$INSTALLER" == "conda" ]]; then
source activate neurtu-env
fi
- pytest -s --doctest-modules --cov=neurtu neurtu/
- |
if [[ "${BUILD_DOCS}" == "true" ]]; then
cd doc/
pip install -r requirements.txt
make html
fi
after_success:
- |
if [ ${RUN_COVERAGE} = true ]; then
codecov
fi
cache:
- directories:
- $HOME/.cache/pip