Skip to content

Commit e670882

Browse files
authored
Merge pull request #112 from datacamp/travis-ci
Travis ci
2 parents 53984ba + 5a5fa39 commit e670882

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
language: R
22
sudo: false
33
cache: packages
4-
r_check_args: --as-cran --no-tests
5-
4+
r_check_args: --as-cran
5+
install:
6+
- R -e 'install.packages(c("devtools", "rjson"))'
7+
- R -e 'devtools::install_deps(dep = T)'
8+
- R -e 'devtools::install(".")'
9+
- R -e 'devtools::install_github(c("datacamp/r-completion", "datacamp/r-backend@fix-is-datacamp"), dependencies = FALSE)'

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ Suggests:
2020
rmarkdown,
2121
ggvis,
2222
lazyeval,
23-
testthat
23+
testthat,
24+
RBackend
25+
Remotes: datacamp/r-backend
2426
License: MIT + file LICENSE
2527
LazyData: true
2628
Authors@R: c(person("Andreas", "Alfons", role = "aut"),

tests/testthat.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
Sys.unsetenv("R_TESTS")
2+
13
library("testthat")
2-
test_check("testwhat")
4+
5+
library("testwhat")
6+
7+
test_dir("testthat")

tests/testthat/test-check-wd.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ context("check_wd")
33
## Really funky stuff with these tests...
44

55
test_that("check_wd - 1", {
6+
skip_on_travis()
67
lst <- list()
78
lst$DC_PEC <- "if (file.exists('testing.txt')) file.remove('testing.txt')"
89
lst$DC_CODE <- "write('testing', file = 'testing.txt')"
@@ -13,6 +14,7 @@ test_that("check_wd - 1", {
1314
})
1415

1516
test_that("check_wd - 2", {
17+
skip_on_travis()
1618
lst <- list() # no pec, no solution, no user code
1719

1820
lst$DC_SCT <- "ex() %>% check_wd('non_existing.txt')"
@@ -25,6 +27,7 @@ test_that("check_wd - 2", {
2527
})
2628

2729
test_that("check_wd - 3", {
30+
skip_on_travis()
2831
lst <- list() # no pec, no solution, no user code
2932

3033
lst$DC_SCT <- "ex() %>% check_wd('test/non_existing.txt')"
@@ -37,6 +40,7 @@ test_that("check_wd - 3", {
3740
})
3841

3942
test_that("test_file_exists - backwards compatible - 1", {
43+
skip_on_travis()
4044
lst <- list()
4145
lst$DC_PEC <- "if (file.exists('testing.txt')) file.remove('testing.txt')"
4246
lst$DC_CODE <- "write('testing', file = 'testing.txt')"
@@ -47,6 +51,7 @@ test_that("test_file_exists - backwards compatible - 1", {
4751
})
4852

4953
test_that("test_file_exists - backwards compatible - 2", {
54+
skip_on_travis()
5055
lst <- list() # no pec, no solution, no user code
5156

5257
lst$DC_SCT <- "test_file_exists('non_existing.txt')"
@@ -59,6 +64,7 @@ test_that("test_file_exists - backwards compatible - 2", {
5964
})
6065

6166
test_that("test_file_exists - backwards compatible - 3", {
67+
skip_on_travis()
6268
lst <- list() # no pec, no solution, no user code
6369

6470
lst$DC_SCT <- "test_file_exists('test/non_existing.txt')"

0 commit comments

Comments
 (0)