cr_buildstep_packagetests: Do R package tests and upload to Codecov
Description
This lets you run R package tests and is intended to be used in a trigger when you push to a repository so you can monitor code quality.
Usage
cr_buildstep_packagetests(
test_script = NULL,
codecov_script = NULL,
codecov_token = "$_CODECOV_TOKEN",
build_image = "gcr.io/gcer-public/packagetools:master",
env = c("NOT_CRAN=true")
)
Arguments
test_script
The script that will run first making tests. If NULL
a default script it used
codecov_script
The script that will run first making tests. If NULL
a default script it used
codecov_token
If using codecov, supply your codecov token here. Default assumes you add it to the Cloud Build substitution macros, which is more secure and recommended.
build_image
The docker image that will be used to run the R code for the test scripts
env
Environment arguments to be set during the test script runs
Examples
Run this code# NOT RUN {
cr_buildstep_packagetests()
# }
Run the code above in your browser using DataLab