Skip to content

Commit f195f8a

Browse files
authored
use script (#1353)
1 parent 7b189ad commit f195f8a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ jobs:
244244
- run:
245245
name: 🔧fix up dash metadata
246246
command: |
247-
sudo Rscript -e 'dash_desc <- read.dcf("dashR/DESCRIPTION"); dt_version <- read.dcf("dash-table/DESCRIPTION")[,"Version"]; dcc_version <- read.dcf("dash-core-components/DESCRIPTION")[,"Version"]; dhc_version <- read.dcf("dash-html-components/DESCRIPTION")[,"Version"]; imports <- dash_desc[,"Imports"][[1]]; imports <- gsub("((?<=dashHtmlComponents )(\\\\(.*?\\\\)))", paste0("(= ", dhc_version, ")"), imports, perl = TRUE); imports <- gsub("((?<=dashCoreComponents )(\\\\(.*?\\\\)))", paste0("(= ", dcc_version, ")"), imports, perl = TRUE); imports <- gsub("((?<=dashTable )(\\\\(.*?\\\\)))", paste0("(= ", dt_version, ")"), imports, perl = TRUE); dash_desc[,"Imports"][[1]] <- imports; dhc_hash <- system("cd dash-html-components; git rev-parse HEAD | tr -d '\''\n'\''", intern=TRUE); dcc_hash <- system("cd dash-core-components; git rev-parse HEAD | tr -d '\''\n'\''", intern=TRUE); dt_hash <- system("cd dash-table; git rev-parse HEAD | tr -d '\''\n'\''", intern=TRUE); remotes <- dash_desc[,"Remotes"][[1]]; remotes <- gsub("((?<=plotly\\\\/dash-html-components@)([a-zA-Z0-9]+))", dhc_hash, remotes, perl=TRUE); remotes <- gsub("((?<=plotly\\\\/dash-core-components@)([a-zA-Z0-9]+))", dcc_hash, remotes, perl=TRUE); remotes <- gsub("((?<=plotly\\\\/dash-table@)([a-zA-Z0-9]+))", dt_hash, remotes, perl=TRUE); dash_desc[,"Remotes"][[1]] <- remotes; write.dcf(dash_desc, "dashR/DESCRIPTION")'
247+
sudo Rscript dashR/tests/circleci/fixup_metadata.R
248248
249249
- run:
250250
name: 🎛 set environment variables
@@ -287,7 +287,7 @@ jobs:
287287
Rscript -e "message(devtools::check_failures(path = '${DCC_CHECK_DIR}'))"
288288
Rscript -e "message(devtools::check_failures(path = '${DT_CHECK_DIR}'))"
289289
Rscript -e "message(devtools::check_failures(path = '${DASH_CHECK_DIR}'))"
290-
# warnings are errors; enable for stricter checks once CRAN submission finished
290+
# warnings are errors; enabled for stricter CRAN checks, disable if noisy
291291
# if grep -q -R "WARNING" "${DHC_CHECK_DIR}/00check.log"; then exit 1; fi
292292
# if grep -q -R "WARNING" "${DCC_CHECK_DIR}/00check.log"; then exit 1; fi
293293
# if grep -q -R "WARNING" "${DT_CHECK_DIR}/00check.log"; then exit 1; fi
@@ -296,6 +296,8 @@ jobs:
296296
- run:
297297
name: 🔎 run unit tests
298298
command: |
299+
# unfortunately testthat does not and will not support returning a status
300+
# code other than success, even when tests fail -- this is a workaround
299301
sudo Rscript -e 'res=devtools::test("dashR/tests/", reporter=default_reporter());df=as.data.frame(res);if(sum(df$failed) > 0 || any(df$error)) {q(status=1)}'
300302
301303
- run:

0 commit comments

Comments
 (0)