Skip to content

Commit

Permalink
adjust tests in order to fix broken Mac checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Sep 4, 2024
1 parent 456086a commit f004a92
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-from_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ test_that("nflverse_download downloads files",{

skip_on_cran()
skip_if_offline("github.com")
# The test on Mac keeps failing because of API rate limits,
# maybe it's because the runner doesn't pass the token correctly
skip_if(
condition = Sys.getenv("NFLVERSE_GH_TOKEN", unset = "") == "",
message = "Can't find env var NFLVERSE_GH_TOKEN for some reason"
)

temp_dir <- tempdir(check = TRUE)

Expand Down Expand Up @@ -101,6 +107,12 @@ test_that("nflverse_releases lists releases",{

skip_on_cran()
skip_if_offline("github.com")
# The test on Mac keeps failing because of API rate limits,
# maybe it's because the runner doesn't pass the token correctly
skip_if(
condition = Sys.getenv("NFLVERSE_GH_TOKEN", unset = "") == "",
message = "Can't find env var NFLVERSE_GH_TOKEN for some reason"
)

releases <- nflverse_releases(.token = Sys.getenv("NFLVERSE_GH_TOKEN", unset = gh::gh_token()))

Expand Down

0 comments on commit f004a92

Please sign in to comment.