forked from OGGM/oggm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (48 loc) · 1.42 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
sudo: required
dist: trusty
services:
- docker
notifications:
email: false
branches: # blacklist
except:
- appveyor
- docs
cache:
directories:
- $HOME/dl_cache
matrix:
fast_finish: true
include:
- env: OGGM_TEST_ENV=prepro MPL=
- env: OGGM_TEST_ENV=numerics MPL=
- env: OGGM_TEST_ENV=models MPL=
- env: OGGM_TEST_ENV=benchmark MPL=
- env: OGGM_TEST_ENV=workflow MPL=--mpl OGGM_TEST_MULTIPROC=False
- env: OGGM_TEST_ENV=workflow MPL=--mpl OGGM_TEST_MULTIPROC=True
- env: OGGM_TEST_ENV=graphics MPL=--mpl
before_install:
- docker pull oggm/untested_base:latest
install:
- |
cat <<EOF >test.sh
set -x
set -e
pip3 install --upgrade git+https://github.com/fmaussion/salem.git
pip3 install coveralls
cd /root/oggm
pip3 install -e .
pytest oggm $MPL --cov-config .coveragerc --cov=oggm --cov-report term-missing
coverage combine
coveralls || true
exit 0
EOF
- mkdir -p $HOME/dl_cache
- export OGGM_DOWNLOAD_CACHE=/dl_cache
- docker create --name oggm_travis -ti -v $HOME/dl_cache:/dl_cache -e OGGM_DOWNLOAD_CACHE -e OGGM_TEST_ENV -e OGGM_TEST_MULTIPROC -e CI -e TRAVIS -e TRAVIS_JOB_ID -e TRAVIS_BRANCH -e TRAVIS_PULL_REQUEST oggm/untested_base:latest /bin/bash /root/oggm/test.sh
- docker cp $PWD oggm_travis:/root/oggm
script:
- export OGGM_DOWNLOAD_CACHE=/dl_cache
- docker start -ai oggm_travis
after_script:
- docker rm oggm_travis