Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7f6448c

Browse files
kaguilleraJulioV
authored andcommittedMay 18, 2020
Add Travis CI
1 parent ab0d32c commit 7f6448c

File tree

9 files changed

+911
-216
lines changed

9 files changed

+911
-216
lines changed
 

‎.Rprofile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source("renv/activate.R")
2+
options(renv.settings.snapshot.type = "all")

‎.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ target/
8585

8686
# Mypy cache
8787
.mypy_cache/
88-
.Rprofile
8988
packrat/lib*/
9089
packrat/*
9190
!packrat/packrat.lock
@@ -108,5 +107,4 @@ reports/
108107
.RData
109108
.Rhistory
110109
sn_profile_*/
111-
renv/
112-
110+
settings.dcf

‎.travis.yml

+51-40
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,61 @@
11
services:
22
- mysql
33

4-
os: linux
4+
language: python # this works for Linux but is an error on macOS or Windows
55

6-
dist: xenial
7-
8-
language: python
9-
python:
10-
- '3.7'
11-
12-
cache:
13-
directories:
14-
- /home/linuxbrew/.linuxbrew
15-
- $HOME/.local/share/renv
16-
- $TRAVIS_BUILD_DIR/renv/library
17-
18-
before_install:
19-
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
20-
- export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
21-
- source ~/.bashrc
22-
- sudo apt-get install linuxbrew-wrapper
23-
- brew install r
24-
# - sudo chmod ugo+rw /usr/local/lib/R/site-library
25-
- R -e 'install.packages(c( "rmarkdown"), repos = "http://cran.us.r-project.org")'
26-
- R --version
6+
jobs:
7+
include:
8+
- name: "Python 3.7 on Xenial Linux"
9+
os: linux
10+
language: python
11+
python: 3.7
12+
before_install:
13+
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
14+
- export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
15+
- source ~/.bashrc
16+
- sudo apt-get install linuxbrew-wrapper
17+
- brew tap --shallow linuxbrew/xorg
18+
- brew install r
19+
- R --version
20+
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
21+
- bash miniconda.sh -b -p $HOME/miniconda
22+
- source "$HOME/miniconda/etc/profile.d/conda.sh"
23+
- hash -r
24+
- conda config --set always_yes yes --set changeps1 no
25+
cache:
26+
directories:
27+
- /home/travis/.linuxbrew
28+
- $HOME/.local/share/renv
29+
- $TRAVIS_BUILD_DIR/renv/library
30+
31+
- name: "Python 3.7 on macOS"
32+
os: osx
33+
osx_image: xcode11.3 # Python 3.7 running on macOS 10.14.4
34+
language: generic # 'language: python' is an error on Travis CI macOS
35+
before_install:
36+
- brew install mysql
37+
- brew services start mysql
38+
- brew install r
39+
- R --version
40+
- brew cask install miniconda
41+
- eval "$(/usr/local/bin/conda shell.bash hook)"
42+
env:
43+
- RENV_PATHS_ROOT="$HOME/renv/cache"
44+
cache:
45+
directories:
46+
- /usr/local/lib/R
47+
- $RENV_PATHS_ROOT
48+
- $TRAVIS_BUILD_DIR/renv/library
2749

2850
install:
29-
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
30-
- bash miniconda.sh -b -p $HOME/miniconda
31-
- source "$HOME/miniconda/etc/profile.d/conda.sh"
32-
- hash -r
33-
- conda config --set always_yes yes --set changeps1 no
34-
- conda update -q conda
35-
- conda info -a
51+
- conda init
52+
- conda update -q --all --yes conda
3653
- conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file environment.yml
3754
- conda activate test-environment
3855
- snakemake renv_install
39-
- snakemake renv_init
40-
- snakemake renv_restore
41-
56+
- R -e 'renv::settings$use.cache(FALSE)'
57+
- snakemake renv_restore
58+
4259
script:
4360
- cp -r tests/data/raw/* data/raw
4461
- snakemake --profile tests/settings -R sms_features
@@ -47,16 +64,10 @@ script:
4764
notifications:
4865
email: false
4966
slack:
67+
# if: branch = travis_test
5068
secure: cJIpmIjb3zA5AMDBo9axF1v6fYNIgMm6s6UdMNOlHiT511xHGsaLUFej3lACwQLig4Gr94ySI61YdrP+RX1lFcYxusH+kUU/c8LX0PmSKNeKnycM3w/pCM+yTp/6oQG6ZrJD7pNm6zhB0xPL61uSmYhcr+JJ1sh4iLiON+J8/C+IfnAHm1ORkxJ0IxASkiP/LvaiAQDw8lNyYIZNWjSDNZbx68o1VNakyk6Vik3x8omiE3w33rzI2/JAx//QTxOq2J0dtV1AqYYSOWS4iXblV09NLBqgGrhAhrQ6+TbPHSPIyL/4EdhvS+YXO+SBWS7ODD7j/MuL6XiA4SujW72od2rgXNmOjFnlQvIrULO5bzv39BKKDkldvz9+XCyXLcjoLIwA/rmUnwMndNoC7NoD/CkQEevUxswXXB9811BmIFx/7GOHouVxwB2gaMAzkCroZJVwgbrc6ESSOVE5SMcb3wPMbpd8cXOgVZXJcmk5wK206zxXPigCvFfknqOnwDqRgyIWSFoTd/2wHppA7ND3R5U42nQTbEQ7MiONsOo61GlJTTxJELz32sLKl388AuAgOY7+0sqPibxMaHJkF1V4nYVTH0/H5bO/edK4VHMloJ6s0kuyko7LT5EMQf3pBJij5TnYmD2E60t+bSBAxHuH7WA5dvL+igjGEwROnxDc9pc=
5169
on_success: always
5270
template:
5371
- "Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`."
5472
- "Execution time: *%{duration}*"
55-
- "Message: %{message}"
56-
57-
branches:
58-
except:
59-
- master
60-
61-
only:
62-
- travis_test
73+
- "Message: %{message}"

‎environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: moshi-env
22
channels:
33
- anaconda
4-
- defaults
54
- conda-forge
5+
- defaults
66
dependencies:
77
- appdirs=1.4.3
88
- arrow=0.15.2

0 commit comments

Comments
 (0)
Please sign in to comment.