Skip to content

Commit 8bd4613

Browse files
committed
More obvious env var naming
1 parent bd63208 commit 8bd4613

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
config:
29-
- {os: macOS-latest, r: 'release', vdiffr: true, node: "8.x", shinytest: true}
29+
- {os: macOS-latest, r: 'release', visual_tests: true, node: "14.x", shinytest: true}
3030
- {os: windows-latest, r: 'release'}
3131
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
3232
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
@@ -39,7 +39,7 @@ jobs:
3939

4040
env:
4141
RSPM: ${{ matrix.config.rspm }}
42-
VDIFFR: ${{ matrix.config.vdiffr }}
42+
VISUAL_TESTS: ${{ matrix.config.visual_tests }}
4343
SHINYTEST: ${{ matrix.config.shinytest }}
4444
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
4545
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
@@ -84,7 +84,7 @@ jobs:
8484
node-version: ${{ matrix.config.node }}
8585

8686
- name: Install orca
87-
if: matrix.config.vdiffr == true
87+
if: matrix.config.visual_tests == true
8888
run: npm install -g [email protected] orca
8989
shell: bash
9090

tests/testthat/helper-vdiffr.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# If VDIFFR is TRUE, enable visual testing
2-
enable_vdiffr <- grepl("true", Sys.getenv("VDIFFR"), fixed = TRUE)
1+
visual_testing <- grepl("true", Sys.getenv("VISUAL_TESTS"), fixed = TRUE)
32

4-
message("Visual testing is ", if (!enable_vdiffr) "not ", "enabled.")
3+
message("Visual testing is ", if (!visual_testing) "not ", "enabled.")
54

65
# start up the orca image server
7-
if (enable_vdiffr) {
6+
if (visual_testing) {
87
# try 20 random ports
98
for (vdiff_port_tries in 1:20) {
109
port <- floor(runif(1, 3001, 8000))
@@ -21,7 +20,7 @@ if (enable_vdiffr) {
2120

2221
expect_doppelganger <- function(p, name, ...) {
2322

24-
if (!enable_vdiffr) {
23+
if (!visual_testing) {
2524
return(invisible(NULL))
2625
}
2726

0 commit comments

Comments
 (0)