forked from usnistgov/pfhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (50 loc) · 1.95 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
---
language: python
install:
- sudo apt-get update
- sudo apt-get install ruby ruby-dev nodejs
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -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
- conda info -a
- conda create -q -y -n test-environment python=3.6
- source activate test-environment
- conda install -q -y -n test-environment jupyter pillow numpy toolz pytest bokeh matplotlib scikit-image flake8
- conda install nb_conda nb_conda_kernels nb_anacondacloud
- pip install progressbar2 pykwalify pylint nbval vega
- jupyter nbextension enable vega --py
- unset VIRTUAL_ENV
- gem install jekyll jekyll-coffeescript html-proofer jekyll-redirect-from
- npm install -g npm
- npm install -g coffeelint
- npm install -g mocha
- npm install -g assert
- npm install -g surge
script:
- pylint _data/*.py
- flake8 _data/*.py
- make simulations
- find . -name "*.ipynb" -type f -not -path "*/.ipynb_checkpoints/*" -exec touch {} \;
- make notebooks
- touch _data/hexbin.yaml
- make hexbin
- rm -rf ./_site
- jekyll build -d ./_site/pfhub && htmlproofer --check-html --only-4xx --allow-hash-href --empty-alt-ignore --checks-to-ignore ImageCheck --file-ignore ./_site/pfhub/node_modules ./_site
- py.test --ignore=hackathons/hackathon1 --ignore=benchmarks --ignore=_data --nbval --sanitize-with sanitize.cfg
- coffeelint _includes/coffee/
- mocha _site/pfhub/js/test.js
after_success:
- rm -rf ./_site
- make simulations
- make notebooks
- make hexbin
- jekyll build --baseurl ''
- export DOMAIN=random-cat-${TRAVIS_PULL_REQUEST}.surge.sh
- export SURGE_LOGIN="[email protected]"
- export SURGE_TOKEN="3712d1678fabe65dfad576545befce2f"
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
surge --project _site --domain ${DOMAIN};
fi