Skip to content

Commit

Permalink
Add GH secret KEY to tests and run them on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sebpardo committed Jan 21, 2024
1 parent f3df06d commit 1df7fe6
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- name: Create and populate .Renviron file
run: |
echo "::add-mask::$MAPPED_EBIRD_KEY" >> ~/.Renviron
shell: bash
env:
MAPPED_EBIRD_KEY: ${{ secrets.EBIRD_KEY }}

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
2 changes: 0 additions & 2 deletions tests/testthat/test-ebirdchecklistfeed.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdchecklistfeed")

test_that("ebirdchecklistfeed succeeds reproducibly", {
skip_on_cran()
skip_on_ci()

out1 <- ebirdchecklistfeed(loc = "L207391", date = "2020-03-24", max = 3)
expect_is(out1, "data.frame")
Expand All @@ -13,7 +12,6 @@ test_that("ebirdchecklistfeed succeeds reproducibly", {

test_that("ebirdchecklistfeed errors for bad input", {
skip_on_cran()
skip_on_ci()

expect_warning(ebirdchecklistfeed(loc = "L207391", date = "2020-03-24", max = 250))
expect_error(ebirdchecklistfeed(loc = "L207391", date = "2121-03-25"))
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdgeo.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdgeo")

test_that("ebirdgeo works correctly", {
skip_on_cran()
skip_on_ci()

egeo <- ebirdgeo('amegfi',42,-76)
expect_is(egeo, "data.frame")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdhistorical.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdhistorical")

test_that("ebirdhistorical works correctly", {
skip_on_cran()
skip_on_ci()

out <- ebirdhistorical(loc = 'US-VA-003', date = '2017-03-19')
expect_is(out, "data.frame")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdhotspot.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdhotspot")

test_that("ebirdhotspot works correctly", {
skip_on_cran()
skip_on_ci()

expect_warning(out <- ebirdhotspot('L99381', max = 10, provisional = TRUE))
expect_is(out, "data.frame")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdhotspotlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdhotspotlist")

test_that("ebirdhotspotlist works correctly", {
skip_on_cran()
skip_on_ci()

out <- ebirdhotspotlist("CA-NS-YA")
out2 <- ebirdhotspotlist(lat = 30, lng = -90, dist = 10)
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdloc.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdloc")

test_that("ebirdloc works correctly", {
skip_on_cran()
skip_on_ci()

expect_warning(out <- ebirdloc(c('L99381','L99382')))
expect_is(out, "data.frame")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdnotable.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdnotable")

test_that("ebirdnotable works correctly", {
skip_on_cran()
skip_on_ci()

out <- ebirdnotable(lat=42, lng=-70, max = 40)
expect_is(out, "data.frame")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdregion.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdregion")

test_that("ebirdregion works correctly", {
skip_on_cran()
skip_on_ci()

out <- ebirdregion(loc = 'US', species = 'btbwar', max = 50)
expect_is(out, "data.frame")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdregioncheck.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdregioncheck")

test_that("ebirdregioncheck works correctly", {
skip_on_cran()
skip_on_ci()

expect_warning(expect_is(ebirdregioncheck("CA"), "logical"))
expect_warning(expect_equal(ebirdregioncheck("CA"), TRUE))
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-ebirdregioninfo.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdregioninfo")

test_that("ebirdregioninfo works correctly", {
skip_on_cran()
skip_on_ci()

us <- ebirdregioninfo("US")

Expand All @@ -26,7 +25,6 @@ test_that("ebirdregioninfo works correctly", {

test_that("ebirdregioninfo fails correctly", {
skip_on_cran()
skip_on_ci()

expect_error(ebirdregioninfo())
expect_error(ebirdregioninfo("foo"), class = "error")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdregionspecies.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdregionspecies")

test_that("ebirdregionspecies works correctly", {
skip_on_cran()
skip_on_ci()

eng <- ebirdregionspecies("GB-ENG")
lon <- ebirdregionspecies("GB-ENG-LND")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-ebirdsubregionlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("ebirdsubregionlist")

test_that("ebirdsubregionlist works correctly", {
skip_on_cran()
skip_on_ci()

countries = ebirdsubregionlist("country")

Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-nearestobs.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ context("nearestobs")

test_that("nearestobs works correctly", {
skip_on_cran()
skip_on_ci()

out <- nearestobs('cangoo', 42, -76)
out2 <- nearestobs('cangoo', 42,-76, max=10, provisional=TRUE, hotspot=TRUE)
Expand Down

0 comments on commit 1df7fe6

Please sign in to comment.