Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis-ci and Coveralls not updating #91

Closed
sebpardo opened this issue Sep 27, 2021 · 12 comments
Closed

Travis-ci and Coveralls not updating #91

sebpardo opened this issue Sep 27, 2021 · 12 comments

Comments

@sebpardo
Copy link
Contributor

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 ?

@sckott
Copy link
Contributor

sckott commented Sep 27, 2021

Sounds good! Update as you see fit

@sebpardo
Copy link
Contributor Author

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

@sckott
Copy link
Contributor

sckott commented Sep 27, 2021

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

@slager
Copy link
Collaborator

slager commented Jan 10, 2024

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.

@sebpardo
Copy link
Contributor Author

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

@slager
Copy link
Collaborator

slager commented Jan 16, 2024

#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?

@sebpardo
Copy link
Contributor Author

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).

@slager
Copy link
Collaborator

slager commented Jan 16, 2024

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
Copy link
Collaborator

slager commented Jan 18, 2024

@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.

@sebpardo
Copy link
Contributor Author

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.

@slager
Copy link
Collaborator

slager commented Jan 22, 2024

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.

@sebpardo
Copy link
Contributor Author

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

@slager slager closed this as completed Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants