-
Notifications
You must be signed in to change notification settings - Fork 19
58 lines (54 loc) · 1.89 KB
/
ci.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
name: build_notebooks
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup environment
run: |
mkdir -p download
cd download
echo "Cached in $HOME/download :"
if [[ ! -f miniconda.sh ]]
then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
-O miniconda.sh
fi
chmod +x miniconda.sh && ./miniconda.sh -b
cd ..
export PATH="$HOME/miniconda3/bin:$PATH"
conda update --yes conda
# Configure the conda environment and put it in the path using the
# provided versions
conda create -n testenv --yes python=$PYTHON_VERSION pip nose pytest
conda env update -n testenv -f binder/environment.yml -q
source activate testenv
chmod a+x binder/postBuild
sh binder/postBuild
ipython kernel install --user --name testkernel
jupyter kernelspec list
- name: Build Lectures
run: |
export PATH="$HOME/miniconda3/bin:$PATH";
source activate testenv;
shopt -s globstar;
for nb in Lectures/*ipynb; do
if [[ $nb = *"Kaggle"* ]]; then
echo "skipping kaggle kernel $nb";
else
jupyter nbconvert --ExecutePreprocessor.timeout=3600 --ExecutePreprocessor.kernel_name=testkernel --execute "$nb" --to markdown
fi;
done
- name: Build Exercises
run: |
export PATH="$HOME/miniconda3/bin:$PATH";
source activate testenv;
shopt -s globstar;
for nb in Exercises/*ipynb; do
if [[ $nb = *"Kaggle"* ]]; then
echo "skipping kaggle kernel $nb";
else
jupyter nbconvert --ExecutePreprocessor.timeout=3600 --ExecutePreprocessor.kernel_name=testkernel --execute "$nb" --to markdown
fi;
done