Skip to content

Commit

Permalink
Switch to docker based build for Travis
Browse files Browse the repository at this point in the history
1. Won't time out
2. More reproducible
3. If @cgreene does it, it must be good
  • Loading branch information
ethanwhite committed Jul 27, 2017
1 parent 07c4b0a commit d59d65b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
language: r
cache: packages
sudo: false
warnings_are_errors: false
language: bash
sudo: required

install:
- Rscript install-packages.R

script:
- Rscript PortalForecasts.R
before_install:
- docker pull weecology/portal_predictions
- docker run --name ppred -t -d weecology/portal_predictions /bin/bash

after_success:
- bash update_repo.sh
script:
- docker exec -i ppred git clone https://github.com/weecology/portalPredictions.git
- docker exec -i ppred bash -c "cd portalPredictions && Rscript PortalForecasts.R"
- docker exec -i ppred bash -c "cd portalPredictions && bash update_repo.sh"
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Use an official Python runtime as a parent image
FROM rocker/tidyverse:latest

# Install `curl` since apparently it isn't in the Rocker images

RUN apt-get update && apt-get install -y curl

# Copy the install script
ADD install-packages.R .

# Install any needed packages specified in requirements.txt
RUN Rscript install-packages.R

0 comments on commit d59d65b

Please sign in to comment.