Skip to content

Commit

Permalink
fix 'test_all' condition in all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Feb 13, 2025
1 parent 37e0ed0 commit c107977
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dodgr
Title: Distances on Directed Graphs
Version: 0.4.1.050
Version: 0.4.1.051
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre")),
person("Andreas", "Petutschnig", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/UrbanAnalyst/dodgr",
"issueTracker": "https://github.com/UrbanAnalyst/dodgr/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.4.1.050",
"version": "0.4.1.051",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# GitHub runners.
testthat::skip_on_os ("windows")

test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

testthat::skip_if (!test_all)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-centrality.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

# testthat::skip_on_cran ()
testthat::skip_if (!test_all)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-deduplicate.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

# testthat::skip_if (!test_all)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-dists-categorical.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
context ("dodgr_dists_categorical")

test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

if (!test_all) {
RcppParallel::setThreadOptions (numThreads = 2)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-dists-nearest.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

if (!test_all) {
RcppParallel::setThreadOptions (numThreads = 2)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-dists.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

if (!test_all) {
RcppParallel::setThreadOptions (numThreads = 2)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-flows.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

testthat::skip_on_cran ()

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-graph-fns.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

skip_if (!test_all)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-iso.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

if (!test_all) {
RcppParallel::setThreadOptions (numThreads = 2)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-match-pts-fns.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

skip_if (!test_all)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-save-load.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
testthat::skip_on_cran ()
testthat::skip_on_os ("mac")

test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

if (!test_all) {
RcppParallel::setThreadOptions (numThreads = 2)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-sc.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
context ("SC")

test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))

skip_if (!test_all)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-streetnet.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dodgr_cache_off ()
clear_dodgr_cache ()

test_all <- (identical (Sys.getenv ("MPADGE_LOCAL", "false"), "true") ||
identical (Sys.getenv ("GITHUB_WORKFLOW", "nope"), "test-coverage"))
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") ||
identical (Sys.getenv ("GITHUB_JOB"), "test-coverage"))
# used below in a skip_if call

test_that ("streetnet bbox", {
Expand Down

0 comments on commit c107977

Please sign in to comment.