rebird icon indicating copy to clipboard operation
rebird copied to clipboard

Travis-ci and Coveralls not updating

Open sebpardo opened this issue 2 years ago • 3 comments

I noticed that travis-ci and coveralls are not being ran with the latest commits/releases; travis-ci last ran on an commit from 8 months ago while coveralls last ran 5 years ago. Obviously this isn't any issue with rebird itself, but I wonder if we should update the badges? @sckott ?

sebpardo avatar Sep 27 '21 13:09 sebpardo

Sounds good! Update as you see fit

sckott avatar Sep 27 '21 17:09 sckott

Will do. Any idea why these two aren't updating though?

sebpardo avatar Sep 27 '21 18:09 sebpardo

I don't know, but I'd suggest moving to Github actions anyway. https://devguide.ropensci.org/ci.html?q=actions#github-actions-linux-mac-osx-windows

sckott avatar Sep 27 '21 19:09 sckott

If helpful @sebpardo I could submit a PR to add GitHub Actions R CMD Check CI (windows, mac, linux) and its badge.

Once that is working, I have further ideas for removing/replacing some of the other broken badges and CI systems.

slager avatar Jan 10 '24 08:01 slager

Yes @slager, that would be very helpful! I'm quite out of the loop with regards to check options.

sebpardo avatar Jan 15 '24 23:01 sebpardo

#98 adds GitHub actions checks and keeps the other CI and badges for now. If and when GitHub Actions checks work, I could submit another PR to remove the old Travis and Appveyor stuff, unless there is a reason to keep that around?

slager avatar Jan 16 '24 05:01 slager

I don't see the need to keep the old Travis and Appveyor checks once GitHub Actions checks work, however they are all failing as they require an API key to properly run the tests (see issue #100).

sebpardo avatar Jan 16 '24 18:01 sebpardo

Looks like the GitHub Actions checks and badge are now working. Thanks for adding the badge to the .rd file.

Some tests are failing because the CI doesn't have the API key. I can submit a PR to temporarily skip these tests using testthat::skip_on_ci(). In the medium term, I am working on using the vcr package so that the tests can be run on CRAN and GitHub Actions without needing an API key. This will facilitate switching to codecov as well to get the code coverage CI working again.

#100

slager avatar Jan 16 '24 18:01 slager

@sebpardo The path of least resistance for code coverage seems to be codecov but it may be necessary to contact someone at ropensci to have them activate rebird there. Or maybe it will just start working automatically when the first codecov GitHub Action runs.

As for integrating test coverage into GitHub Actions, I think there are maybe 2 options.

  1. add the API Key as a GitHub Secret which can be added into the Actions directly. Not totally sure yet how that would work.
  2. mock the API requests using the vcr package. It's how rvertnet, another API-heavy package, did it.

I've been playing around locally with option 2 and this seems to work quite well, with the added benefit of speeding up testing since the API requests are not actually re-done each time. The basic idea is that one can run the tests locally using one's own eBird API and create YML files that record the API interactions. Then on CI and CRAN, the tests run by playing back these API recordings, not requiring any API keys in CI at all. The recordings can periodically be refreshed locally, for example when eBird updates their API.

If 2 sounds good I can move ahead with working on a PR for that so that the tests run on GitHub Actions with the R CMD checks using vcr, and can also add the test coverage GitHub Action & new code coverage badge.

slager avatar Jan 18 '24 06:01 slager

Hi @slager,

I think option 1 is the simplest and likely best alternative; I just looked into it and it seems pretty straightforward. I've created a rebird-specific eBird account so we have a somewhat disposable API key, just in case.

sebpardo avatar Jan 21 '24 21:01 sebpardo

Definitely not opposed to option 1 if can get it working. See example run and documentation in #105 for pros and cons of option 2.

slager avatar Jan 22 '24 03:01 slager

Hey @slager, I think you've fully dealt with this now, can we close?

sebpardo avatar Mar 24 '24 00:03 sebpardo