Skip to content

Commit

Permalink
feat: add 'CI' envvar for ropensci-review-tools/roreviewapi#63 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge authored Nov 11, 2024
1 parent 5b9c80d commit 9ab8be6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ FROM ghcr.io/ropensci-review-tools/pkgcheck:latest
LABEL maintainer="Jacob Wujciak-Jens <[email protected]>"

ENV NOT_CRAN "true"

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / push

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / push

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV CI "ropensci"

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / push

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / push

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

COPY R/check.R /check.R
COPY R/install.R /install.R

RUN ["Rscript", "/install.R"]

ENTRYPOINT [ "Rscript", "/check.R" ]
ENTRYPOINT [ "Rscript", "/check.R" ]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ jobs:

There are also several parameters which can be used to modify the workflow, as described in the following section.

### Environment variables

This action runs with one environment variable of `CI = "ropensci"`. This
enables
[`testthat::skip_on_ci()`](https://testthat.r-lib.org/reference/skip.html),
which skips tests if a variable named "CI" is set, regardless of value.
Alternately, tests can be fine-tuned to skip within `pkgcheck` by setting
`testthat::skip_if(Sys.getenv("CI") == "ropensci")`.

### Workflow parameters

The [`yaml` workflow
Expand Down

0 comments on commit 9ab8be6

Please sign in to comment.