forked from carpentries-incubator/ml4bio-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (69 loc) · 3.33 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
# Only build the 'none' branch, which does not exist
# https://docs.travis-ci.com/user/customizing-the-build#safelisting-or-blocklisting-branches
branches:
only:
- none
# Use a build matrix to run one set of jobs that test the conda environments
# another to test the URLs in the Markdown files
# and other to test the lessons and web site
# See https://stackoverflow.com/questions/27644586/how-to-set-up-travis-ci-with-multiple-languages
matrix:
include:
# Configuration adapted from https://github.com/gitter-lab/t-cell-classification
- language: minimal
name: Conda environment Linux
os: linux
before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/anaconda
- export PATH="$HOME/anaconda/bin:$PATH"
- cd scripts
# Avoid QXcbConnection error by confirming ml4bio can be imported instead of launching the GUI
- sed -i 's/^ml4bio$/python -c "import ml4bio; print(ml4bio.__version__)"/g' install_launch_linux.sh
script:
- ./install_launch_linux.sh
- language: minimal
name: Conda environment macOS
os: osx
before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-4.5.12-MacOSX-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/anaconda
- export PATH="$HOME/anaconda/bin:$PATH"
- cd scripts
# Avoid QXcbConnection error by confirming ml4bio can be imported instead of launching the GUI
# sed workaround needed because macOS does not use GNU sed
# Workaround from https://github.com/manubot/rootstock/blob/master/SETUP.md
- sed 's/^ml4bio$/python -c "import ml4bio; print(ml4bio.__version__)"/g' install_launch_mac.command > tmp && mv -f tmp install_launch_mac.command
- chmod u+x install_launch_mac.command
script:
- ./install_launch_mac.command
# Configuration adapted from https://github.com/dkhamsing/awesome_bot
- language: ruby
name: Check URLs
rvm: 2.4.1
before_script: gem install awesome_bot
script: awesome_bot guide/*.md --allow-redirect --allow-dupe
# Configuration adapted from https://github.com/carpentries/styles/blob/gh-pages/bin/boilerplate/.travis.yml
# Travis CI is only used to check the lesson and is not involved in its deployment
- language: python
name: Check lessons and site
dist: xenial # Ubuntu 16.04 (required for python 3.7)
python: 3.7
before_install:
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- echo "deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -y
- sudo apt-get install -y --allow-unauthenticated r-base
- sudo Rscript -e "install.packages('knitr', repos = 'https://', dependencies = TRUE)"
- sudo Rscript -e "install.packages('stringr', repos = 'https://cran.rstudio.com', dependencies = TRUE)"
- sudo Rscript -e "install.packages('checkpoint', repos = 'https://cran.rstudio.com', dependencies = TRUE)"
- sudo Rscript -e "install.packages('ggplot2', repos = 'https://cran.rstudio.com', dependencies = TRUE)"
- rvm default
- gem install json kramdown jekyll bundler
install:
- pip install pyyaml
script:
- make lesson-check-all
- make --always-make site
notifications:
email: false