Skip to content

Commit

Permalink
Merge pull request #1992 from infotroph/postgres-docker
Browse files Browse the repository at this point in the history
Travis: use Docker postgis
  • Loading branch information
mdietze committed Jun 29, 2018
2 parents 9fddec5 + c496a55 commit 4a586cf
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .travis.yml
Expand Up @@ -10,7 +10,10 @@ r:

# TRUSTY: Change version when 16.04 image is available.
dist: trusty
sudo: false
sudo: required

env:
- PGHOST=localhost

cache:
- directories:
Expand All @@ -21,20 +24,18 @@ cache:
- packages

addons:
postgresql: 9.6
apt:
sources:
- sourceline: 'ppa:marutter/c2d4u'
- sourceline: 'ppa:nschloe/hdf5-backports'
- sourceline: 'ppa:ubuntugis/ppa' # for GDAL 2 binaries
packages:
- libnetcdf-dev
- liblapack-dev
- libcurl4-openssl-dev
- jags
- libudunits2-dev
- python-dev
- postgresql-9.6-postgis-2.3
- postgresql-9.6-postgis-2.3-scripts
- netcdf-bin
- bc
- curl
Expand Down Expand Up @@ -98,7 +99,7 @@ notifications:

## list of services to be running
services:
- postgresql
- docker

install:
- pushd $HOME
Expand All @@ -109,6 +110,14 @@ install:
- popd

before_script:
- sudo service postgresql stop
- docker run --detach --rm --name postgresql --publish 5432:5432 mdillon/postgis:9.6-alpine
- echo -n "Waiting for Postgres to start...";
until psql -U postgres -c 'select 1' >/dev/null 2>&1;
do echo -n ".";
sleep 1;
done;
echo " OK"
- psql -q -o /dev/null -U postgres -c "CREATE ROLE BETY WITH LOGIN CREATEDB SUPERUSER CREATEROLE UNENCRYPTED PASSWORD 'bety'";
- psql -q -o /dev/null -U postgres -c "CREATE DATABASE bety OWNER bety;"
- curl -o bety.sql http://isda.ncsa.illinois.edu/~kooper/PEcAn/data/bety.sql
Expand Down
2 changes: 2 additions & 0 deletions modules/data.atmosphere/R/download.AmerifluxLBL.R
Expand Up @@ -16,7 +16,9 @@
##' @param method Optional. download.file() function option. Use this to set custom programs such as ncftp
##'
##' @examples
##' \dontrun{
##' result <- download.AmerifluxLBL("US-Akn","~/","2011-01-01","2011-12-31",overwrite=TRUE)
##' }
##'
##' @author Ankur Desai, based on download.Ameriflux.R by Josh Mantooth, Rob Kooper, Shawn Serbin
download.AmerifluxLBL <- function(sitename, outfolder, start_date, end_date,
Expand Down
2 changes: 2 additions & 0 deletions modules/data.atmosphere/R/download.NEONmet.R
Expand Up @@ -13,7 +13,9 @@
##' @param overwrite should existing files be overwritten
##' @param verbose makes the function output more text
##' @examples
##' \dontrun{
##' result <- download.NEONmet('HARV','~/','2017-01-01','2017-01-31',overwrite=TRUE)
##' }
download.NEONmet <- function(sitename, outfolder, start_date, end_date,
overwrite = FALSE, verbose = FALSE, ...) {

Expand Down
2 changes: 2 additions & 0 deletions modules/data.atmosphere/man/download.AmerifluxLBL.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions modules/data.atmosphere/man/download.NEONmet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4a586cf

Please sign in to comment.