cr_buildstep_packagetests {googleCloudRunner} | R Documentation |
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:latest",
env = c("NOT_CRAN=true")
)
Arguments
test_script |
The script that will call rcmdcheck to perform tests. If |
codecov_script |
The script that will call codecov to perform coverage. If |
codecov_token |
If using codecov, supply your codecov token here. |
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 |
Details
If using codecov, these environment arguments are added to aid with the codecoverage:
* "CODECOV_TOKEN=$_CODECOV_TOKEN"
* "GCB_PROJECT_ID=$PROJECT_ID"
* "GCB_BUILD_ID=$BUILD_ID"
* "GCB_COMMIT_SHA=$COMMIT_SHA"
* "GCB_REPO_NAME=$REPO_NAME"
* "GCB_BRANCH_NAME=$BRANCH_NAME"
* "GCB_TAG_NAME=$TAG_NAME"
* "GCB_HEAD_BRANCH=$_HEAD_BRANCH"
* "GCB_BASE_BRANCH=$_BASE_BRANCH"
* "GCB_HEAD_REPO_URL=$_HEAD_REPO_URL"
* "GCB_PR_NUMBER=$_PR_NUMBER"
See Also
https://docs.codecov.com/reference
Other Cloud Buildsteps:
cr_buildstep_bash()
,
cr_buildstep_decrypt()
,
cr_buildstep_df()
,
cr_buildstep_docker()
,
cr_buildstep_edit()
,
cr_buildstep_extract()
,
cr_buildstep_gcloud()
,
cr_buildstep_gitsetup()
,
cr_buildstep_mailgun()
,
cr_buildstep_nginx_setup()
,
cr_buildstep_pkgdown()
,
cr_buildstep_run()
,
cr_buildstep_r()
,
cr_buildstep_secret()
,
cr_buildstep_slack()
,
cr_buildstep_targets()
,
cr_buildstep()
Examples
cr_buildstep_packagetests()