On GitHub Actions, use the official
Coveralls action instead of
this function: write the coverage with cobertura() and upload
cobertura.xml with coverallsapp/github-action@v2. See the README for an
example workflow. With branch coverage, upload the LCOV file written by
lcov() instead, as the action reads which branches were taken from it.
coveralls(
...,
coverage = NULL,
repo_token = env_var("COVERALLS_TOKEN", "COVERALLS_REPO_TOKEN"),
service_name = NULL,
quiet = TRUE
)The response of Coveralls, parsed from JSON, invisibly. If Coveralls
doesn't accept the upload, coveralls() throws an error of class
covr_coveralls_error with the HTTP status and the response of Coveralls
in its message.
arguments passed to package_coverage()
an existing coverage object to submit, if NULL,
package_coverage() will be called with the arguments from
...
The secret repo token for your repository, found on your
repository's page on Coveralls. The default is the environment variable
COVERALLS_TOKEN, or if it is not set, COVERALLS_REPO_TOKEN, the name
Coveralls uses for it. Coveralls requires a token (see
https://docs.coveralls.io/api-jobs-endpoint). Without one ("" or
NULL), only the CI service and job are submitted, which Coveralls rejects
unless the CI service identifies the repository by itself. With a token,
information about the git commit, branch and remote is also submitted.
The name of the CI service. If NULL, the environment
variable CI_NAME is used if it is set, otherwise the CI service is
detected from the environment, e.g. ‘github’ on GitHub Actions and
‘travis-ci’ on Travis CI. Outside a supported CI service it is
‘local’.
if FALSE, print the output of running the tests (see
package_coverage(), which is called when coverage is NULL) and the
coverage before submission.
With branch coverage (see covr.branch_coverage), each source file sent to
Coveralls also has its branches: the line, block, branch and count of
each branch, as in lcov(). A branch that was never taken has a count of
zero.
The CI service, job, pull request, branch and commit are detected from the
environment variables of the services codecov() supports. Anywhere else,
the branch, commit and remote are looked up from the local git repository.
The environment variables CI_BRANCH and CI_REMOTE override the detected
branch and remote.