Adds bash file to execute after Travis test is successfully completed.
use_covrpage(
file = ".travis/covrpage.sh",
travis_type = c("bash", "pkgdown", "tic"),
travis_blocks = c("after_success", "after_failure", "deploy_ghpages"),
gh_user = gsub("@(.*?)$", "", system("git config user.email", intern = TRUE)),
push_branch = "test",
repo = system("git config travis.slug", intern = TRUE),
deploy_branch = system("git rev-parse --abbrev-ref HEAD", intern = TRUE)
)
character, file path to save bash script to, Default: '.travis/covrpage.sh'
character, build .travis.yml template for bash script, pkgdown deployment or using the 'tic' package from ropenscilabs on GitHub Default: c('bash','pkgdown','tic')
character, vector that defines what .travis.yml blocks tocreate, Default: c('after_success','after_failure','deploy_ghpages')
character, Github user name, Default: gsub("@(.*?)$", "", system("git config user.email", intern = TRUE))
character, branch Travis will create to push updated covrpage readme file, Default: 'test'
character, name of git repo that package is hosted on, Default: system("git config travis.slug", intern = TRUE)
character, name of branch that current package build is located, Default: system("git rev-parse --abbrev-ref HEAD", intern = TRUE) (usually 'master')
Other setup:
make_badge()
,
tencrypt()
,
use_covrpage_vignette()
use_covrpage(travis_type = 'bash',file=file.path(tempdir(),'myfile.sh'))
#> Warning: running command 'git config travis.slug' had status 1
#> Writing myfile.sh bash script to /tmp/RtmpIQwSuF
#> Add to .travs.yml
#>
#> r_github_packages:
#> - yoncid/covrpage
#>
#> after_sucess:
#> - Rscript -e 'covr::codecov()'
#> - bash /tmp/RtmpIQwSuF/myfile.sh
#> after_failure:
#> - bash /tmp/RtmpIQwSuF/myfile.sh
#> deploy:
#> provider: pages
#> skip-cleanup: true
#> github-token: $GITHUB_PAT
#> keep-history: true
#> local-dir: docs
#> on:
#> branch: master
#does not write to disk
use_covrpage(travis_type = 'bash',file=NULL)
#> Warning: running command 'git config travis.slug' had status 1
#> #!/bin/bash
#>
#> set -x
#> if [ $TRAVIS_BRANCH == "master" ] ; then
#>
#> git config --global user.email "travis@travis-ci.org"
#> git config --global user.name "Travis CI"
#>
#> git checkout -b test
#>
#> Rscript -e "devtools::install() ; covrpage::covrpage_ci()"
#>
#> git add .
#> git commit --message "Travis build: $TRAVIS_BUILD_NUMBER [skip ci]"
#>
#> git remote add deploy https://actions:${GITHUB_PAT}@github.com/.git
#> git push -f deploy test -v
#>
#> else
#> echo "Not deploying, since this branch is not master."
#> fi
use_covrpage(travis_type = 'pkgdown')
#> Add to .travs.yml
#>
#> r_github_packages:
#> - yonicd/covrpage
#> - r-lib/pkgdown
#>
#> after_success:
#> - Rscript -e 'covr::codecov()'
#> - Rscript -e 'devtools::install(); covrpage::covrpage_ci()'
#> - Rscript -e 'pkgdown::build_site()'
#> after_failure:
#> - Rscript -e 'devtools::install(); covrpage::covrpage_ci()'
#> - Rscript -e 'pkgdown::build_site()'
#> deploy:
#> provider: pages
#> skip-cleanup: true
#> github-token: $GITHUB_PAT
#> keep-history: true
#> local-dir: docs
#> on:
#> branch: master
use_covrpage(travis_type = 'pkgdown',travis_block = 'after_success')
#> Add to .travs.yml
#>
#> r_github_packages:
#> - yonicd/covrpage
#> - r-lib/pkgdown
#>
#> after_success:
#> - Rscript -e 'covr::codecov()'
#> - Rscript -e 'devtools::install(); covrpage::covrpage_ci()'
#> - Rscript -e 'pkgdown::build_site()'
#>
#>
use_covrpage(travis_type = 'pkgdown',travis_block = 'after_failure')
#> Add to .travs.yml
#>
#> r_github_packages:
#> - yonicd/covrpage
#> - r-lib/pkgdown
#>
#>
#> after_failure:
#> - Rscript -e 'devtools::install(); covrpage::covrpage_ci()'
#> - Rscript -e 'pkgdown::build_site()'
#>
use_covrpage(travis_type = 'pkgdown',travis_block = c('after_success','after_failure'))
#> Add to .travs.yml
#>
#> r_github_packages:
#> - yonicd/covrpage
#> - r-lib/pkgdown
#>
#> after_success:
#> - Rscript -e 'covr::codecov()'
#> - Rscript -e 'devtools::install(); covrpage::covrpage_ci()'
#> - Rscript -e 'pkgdown::build_site()'
#> after_failure:
#> - Rscript -e 'devtools::install(); covrpage::covrpage_ci()'
#> - Rscript -e 'pkgdown::build_site()'
#>