Skip to content

Commit

Permalink
replace R --slave with Rscript
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoer Dong committed Dec 12, 2019
1 parent a7fa5d7 commit 47ac189
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ install:
- docker exec -u root rlang0 bash -c "apt update && apt -y install $system_dep"
script:
# build
- if [ "$job" == "build" ]; then docker exec rlang0 R --slave -e "remotes::install_local(force = TRUE, upgrade = TRUE)"; fi;
- if [ "$job" == "build" ]; then docker exec rlang0 Rscript -e "remotes::install_local(force = TRUE, upgrade = TRUE)"; fi;
# testthat
- if [ "$job" == "test" ]; then docker exec rlang0 R --slave -e "remotes::install_deps(force = TRUE, upgrade = TRUE, dependencies = TRUE)"; fi;
- if [ "$job" == "test" ]; then docker exec rlang0 R --slave -e "pkgload::load_all(); testthat::test_dir('tests/testthat/'); testthat::test_dir('tests/testthat/', reporter = 'fail')"; fi; # default reports summary result, fail exit no-zero when a test fails
- if [ "$job" == "test" ]; then docker exec rlang0 Rscript -e "remotes::install_deps(force = TRUE, upgrade = TRUE, dependencies = TRUE)"; fi;
- if [ "$job" == "test" ]; then docker exec rlang0 Rscript -e "pkgload::load_all(); testthat::test_dir('tests/testthat/'); testthat::test_dir('tests/testthat/', reporter = 'fail')"; fi; # default reports summary result, fail exit no-zero when a test fails
# pkgdown and deploy to GitHub Pages
- if [ "$job" == "pkgdown" ]; then docker exec rlang0 R --slave -e "remotes::install_local(force = TRUE, upgrade = TRUE, dependencies = TRUE)"; fi;
- if [ "$job" == "pkgdown" ]; then docker exec rlang0 R --slave -e "pkgdown::build_site()"; fi;
- if [ "$job" == "pkgdown" ]; then docker exec rlang0 Rscript -e "remotes::install_local(force = TRUE, upgrade = TRUE, dependencies = TRUE)"; fi;
- if [ "$job" == "pkgdown" ]; then docker exec rlang0 Rscript -e "pkgdown::build_site()"; fi;
- if [ "$job" == "pkgdown" ]; then git clone --depth 1 -b gh-pages https://$GITHUB_PAT@github.com/$TRAVIS_REPO_SLUG.git $HOME/gh-pages && mv $HOME/gh-pages/.git pkgdown; fi;
- if [ "$job" == "pkgdown" ]; then cd pkgdown && rm .gitignore && git add --all && git commit -m "[skip ci] build pkgdown at `date '+%Y-%m-%d %H:%M:%S'`" --allow-empty && git push -f && cd ..; fi;

Expand Down
10 changes: 5 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
},
{
"label": "document",
"command": "R --slave -e 'Rcpp::compileAttributes(); roxygen2::roxygenize()'",
"command": "Rscript -e 'Rcpp::compileAttributes(); roxygen2::roxygenize()'",
},
{
"label": "vignettes",
"command": "R --slave -e \"rmarkdown::render('R-raw/vignettes.Rmd')\"",
"command": "Rscript -e \"rmarkdown::render('R-raw/vignettes.Rmd')\"",
},
{
"label": "data",
"command": "R --slave -e \"rmarkdown::render('R-raw/data.Rmd')\"",
"command": "Rscript -e \"rmarkdown::render('R-raw/data.Rmd')\"",
},
{
"label": "pkgdown",
"command": "R --slave -e 'pkgdown::build_site()'",
"command": "Rscript -e 'pkgdown::build_site()'",
"dependsOn": [
"document"
],
Expand All @@ -52,7 +52,7 @@
},
{
"label": "test",
"command": "R --slave -e \"pkgload::load_all(); testthat::test_dir('tests/testthat/')\"",
"command": "Rscript -e \"pkgload::load_all(); testthat::test_dir('tests/testthat/')\"",
"group": {
"kind": "test",
"isDefault": true
Expand Down

0 comments on commit 47ac189

Please sign in to comment.