Skip to content

Commit

Permalink
Merge pull request #19 from avantcredit/add_circle
Browse files Browse the repository at this point in the history
add circle CI
  • Loading branch information
abelcastilloavant committed Jun 6, 2016
2 parents 1a3dac5 + 129ab88 commit bc02186
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 55 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: looker3
Type: Package
Title: looker3 (http://github.com/abelcastilloavant/avant-looker3)
Description: Pull data from Looker using the fancy new 3.0 API.
Version: 0.1.5
Version: 0.1.6
Author: Abel Castillo <[email protected]>
Maintainer: Abel Castillo <[email protected]>
Authors@R: c(person("Abel", "Castillo",
Expand Down
54 changes: 0 additions & 54 deletions JenkinsCi.groovy

This file was deleted.

3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Version 0.1.6
- removed `logout_api_call`, using `cacher` to cache tokens instead.

# Version 0.1.5
- `validate_response` now only warns on unsuccessful logout validations.

Expand Down
9 changes: 9 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
machine:
services:
- docker


test:
override:
- docker run -v /home/ubuntu/looker3:/looker3 -w /looker3 -e GITHUB_PAT=$CIRCLE_GITHUB_PAT -e CODECOV_TOKEN=$CIRCLE_CODECOV_TOKEN kirillseva/avant-r-new bash -c "R -e 'packages <- c(\"roxygen2\"); install.packages(packages);'; Rscript circle_installations.R; R CMD build --no-build-vignettes .; R CMD INSTALL $(ls -1t *.tar.gz | head -n 1); Rscript circle_tests.R"

6 changes: 6 additions & 0 deletions circle_installations.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
devtools::install_github("hadley/devtools");
devtools::install_github("hadley/[email protected]");
devtools::install_github("klutometis/[email protected]");
devtools::install_github("peterhurford/[email protected]");
devtools::install_github("jimhester/covr")

24 changes: 24 additions & 0 deletions circle_tests.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
library(bettertrace)
library(checkr)


# Mounted under root dir in the docker container.
devtools::install("/looker3")

tryCatch({
a <- as.data.frame(devtools::test())
st <- any(a$error | a$failed)
}, error = function(e) {
dput(e)
q(save="no", status = 1)
})

tryCatch({
library(covr)
codecov()
}, error = function (e) {
dput(e)
q(save = "no")
})

q(save="no", status = st)

0 comments on commit bc02186

Please sign in to comment.