/
.travis.yml
89 lines (84 loc) · 2.18 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
81
82
83
84
85
86
87
88
89
language: python
os: linux
dist: xenial
# branches:
# only:
# - master
env:
global:
- CURL_CA_BUNDLE=
- ROOK_URL="http://compute.mips.copernicus-climate.eu/wps"
- ROOK_MODE="async"
matrix:
fast_finish: true
include:
- os: linux
name: "Linux (Python3.6)"
python: "3.6"
addons:
apt:
packages:
- pandoc
update: true
env:
- CONDA_FN="Miniconda3-latest-Linux-x86_64.sh"
- PEP8=false
- BLACK=false
- DOCS=false
- PYTHON_DESIRED=3.6
- os: linux
name: "Linux (Python3.7 + docs)"
python: "3.7"
addons:
apt:
packages:
- pandoc
update: true
env:
- CONDA_FN="Miniconda3-latest-Linux-x86_64.sh"
- PEP8=false
- BLACK=false
- DOCS=true
- PYTHON_DESIRED=3.7
- os: linux
name: "Linux (Python3.8 + pep8)"
python: "3.8"
addons:
apt:
packages:
- pandoc
update: true
env:
- CONDA_FN="Miniconda3-latest-Linux-x86_64.sh"
- PEP8=true
- BLACK=true
- DOCS=false
- PYTHON_DESIRED=3.8
sudo: false
before_install:
# Python 3.x is default
- wget "https://repo.continuum.io/miniconda/$CONDA_FN" -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# Prepare env with Python version
- conda create -n rooki python=$PYTHON_DESIRED
install:
# Update now the env with our environment
- conda env update -f environment.yml
- if [[ $DOCS == true ]]; then conda env update -f docs/environment.yml; fi
- source activate rooki
# Packages for testing
- pip install pytest nbval flake8 black
# Install package
- pip install -e .
script:
- make test
- make test-nb
- if [[ $PEP8 == true ]]; then flake8 rooki tests; fi
- if [[ $BLACK == true ]]; then black --check --target-version py38 rooki tests; fi
- if [[ $DOCS == true ]]; then make -C docs html; fi