-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
89 lines (77 loc) · 3.16 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: generic
sudo: false
cache:
directories:
- $HOME/miniconda
# Removing the directory will remove the env but leave the cached packages
# at $HOME/miniconda/pkgs. That is a win-win because when re-creating the
# env we will download only the new packages.
before_cache:
- rm -rf $HOME/miniconda/envs/BiG-CZ
- rm -rf $HOME/miniconda/envs/PAGE
env:
global:
- secure: "FdmfFPlylPvVz5f+YIIpk1YnwndJoM8s+yyg16hxlycorfTpOaFA+em1TlUFqUWIAa0dc7JWgc0L90ui/Usv41un1Cli6nbG+3rM/Mb/vCSMQCVcbsyB9eFBJNSXmokwB7qtvVzVSXBCOGajLTNLefr7bT+AYzRwd7TaZWKgXJ04D7aRhcKp7nyRkc2ooWdWlpzsK7X9YRvTbWD2ghFHxB70JuA1Zv7VzluxFUJfrKTBwsjVzcZMYXekCjxJiXcIsnOHCZ7ybGlB9v63RvXhOrXcx4Iq7ONGCoeTGKk/8+eMOXYOoXP7tV4WGiltBODqT7zt15YNRSRAjLW7zTXpCJoDi154/F7pbafzJcanV7kOgAtjXMDBS0Krvy9OFokC2zcF2DeOrqWk1rDpnL2KqopsPjSlWDnzpd+bYL9dB5IvVeWvBHWYssjySnj+drrXFbYHx0uxgY62Ok9KiIY5X4QbgGA8ND7bEk2/FFmgAX9I44TxjXLk9P5Y1ka/yaR0eH/8FqdLJqkesMbCkiVz5UnDCAZgarN9bkOMpHHOLHNlS9E10wttiWXK1NbYQxGLgwj5zkuFbzPesYfdZxXqCcFSbZT+iNUJNLQJc/iYQ+bLpSEkQZytMoqmHlhFZRbT82Iu3pXChu7FA6MML5uL28YoYoxv6If2sl9vi+FZsOM="
matrix:
fast_finish: true
include:
- os: linux
env: TEST_TARGET=default
- os: linux
env: TEST_TARGET=coding_standards
- os: linux
env: TEST_TARGET=publish
- os: osx
env: TEST_TARGET=default
allow_failures:
- os: linux
env: TEST_TARGET=coding_standards
- os: osx
env: TEST_TARGET=default
before_install:
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
URL="https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"
elif [ "$TRAVIS_OS_NAME" == "linux" ] ; then
URL="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"
fi
echo ""
if [ ! -f $HOME/miniconda/bin/conda ] ; then
echo "Fresh miniconda installation."
wget $URL -O miniconda.sh
rm -rf $HOME/miniconda
bash miniconda.sh -b -p $HOME/miniconda
fi
export PATH="$HOME/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
conda update conda
install:
# We need to envs b/c the BiG-CZ software stack is not compatible with Pyhton 3 yet.
- conda env create --file webpage/environment.yml --name PAGE
- conda env create --file environment.yml --name BiG-CZ
# Debug.
- conda info --all
- conda list
script:
- if [ $TEST_TARGET == "coding_standards" ]; then
source activate BiG-CZ ;
flake8 --max-line-length=100 ;
python tests/test_coding_standards.py ;
fi
# Test python notebooks.
- if [ $TEST_TARGET == "default" ]; then
source activate BiG-CZ ;
python tests/test_notebooks.py ;
fi
# Publish the notebooks.
- if [ $TEST_TARGET == "publish" ]; then
source activate BiG-CZ ;
pushd webpage && python make_index.py && popd ;
find notebooks/ -maxdepth 1 -name \*.ipynb -print0 | xargs -0 -n1 jupyter nbconvert --to=markdown --template="jupyter-jekyll.tpl" --output-dir=webpage/_notebooks ;
source deactivate && source activate PAGE ;
set -e ;
doctr deploy --sync --built-docs=webpage . ;
fi
doctr:
key-path : 'webpage/github_deploy_key.enc'
deploy-repo : 'BiG-CZ/notebook_data_demo'