forked from open-atmos/PyMPDATA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (52 loc) · 1.76 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
language: python
os: linux
jobs:
include:
- name: "Linux, Python 3.8-dev, newest packages, tests"
python: "3.8-dev"
before_install:
- sudo `which pip` install --upgrade pip
before_script:
- pip install -U $(pip freeze | cut -d '=' -f 1)
- name: "Linux, Python 3.8, required packages, tests and codecov"
python: 3.8
env: CODECOV=TRUE
- name: "Linux, Python 3.8, required packages, examples"
python: 3.8
env: EXAMPLES=TRUE
- name: "OSX, Python 3.8, required packages, tests"
language: shell
os: osx
before_install:
- export PY_SFX=3
- name: "Windows, Python 3.8, required packages, tests"
language: shell
os: windows
before_install:
- choco install python --version 3.8.2
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
install:
- pip$PY_SFX install -U -r requirements.txt
script:
- |
if [[ $EXAMPLES == 'TRUE' ]]; then
python$PY_SFX -m ipykernel install --user
for i in MPyDATA_examples/*/demo*.ipynb; do
jupyter nbconvert --to markdown --stdout $i > $i.md.repo;
jupyter nbconvert --ExecutePreprocessor.timeout=1800 --to markdown --execute --stdout $i || exit 1;
# TEMPORARILY disabled before we find a solution for generated graphics causing diffs to differ
# jupyter nbconvert --ExecutePreprocessor.timeout=1800 --to markdown --execute --stdout $i > $i.md.travis || exit 1;
# diff $i.md.repo $i.md.travis
done;
else
if [[ $CODECOV == 'TRUE' ]]; then
python$PY_SFX -m pytest --cov-report term --cov=MPyDATA MPyDATA_tests;
else
python$PY_SFX -m pytest MPyDATA_tests;
fi;
fi;
after_success:
- |
if [[ $CODECOV == 'TRUE' ]]; then
codecov;
fi;