Skip to content

Commit

Permalink
only run api tests on mac to lessen usage on gha
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-brokamp committed Jul 6, 2024
1 parent c43b3ab commit 22184f1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/testthat/test-check_api_key.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("check_api_key works", {
skip_on_cran()
check_api_key() |>
expect_message("Using valid")
})
2 changes: 2 additions & 0 deletions tests/testthat/test-get_organization_data.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_that("get_organization_data works", {
skip_on_os(c("windows", "linux", "solaris"))
skip_on_cran()
od <- get_organization_data()
expect_equal(od$organization_name, "Organization Cole Brokamp C8A17F7C")
})
2 changes: 2 additions & 0 deletions tests/testthat/test-get_sensor_data.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_that("get_sensor_data works", {
skip_on_os(c("windows", "linux", "solaris"))
skip_on_cran()
c(
get_sensor_data(175413, fields = "name"),
get_sensor_data(as.integer(175413), fields = "name"),
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-get_sensor_history.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_that("get_sensor_history works", {
skip_on_os(c("windows", "linux", "solaris"))
skip_on_cran()
get_sensor_history(
sensor_index = 175413,
fields = c("pm1.0_cf_1", "pm1.0_atm", "pm2.5_cf_1", "pm2.5_atm"),
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-get_sensors_data.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_that("get_sensors_data works", {
skip_on_os(c("windows", "linux", "solaris"))
skip_on_cran()
get_sensors_data(x = as.integer(c(175257, 175413)), fields = c("name")) |>
expect_identical(
tibble::tibble(
Expand Down

0 comments on commit 22184f1

Please sign in to comment.