ropensci / piggyback

:package: for using large(r) data files on GitHub
https://docs.ropensci.org/piggyback
GNU General Public License v3.0
185 stars 26 forks source link

pb_release_delete + testing revamp #85

Closed tanho63 closed 2 years ago

tanho63 commented 2 years ago

This PR adds:

tanho63 commented 2 years ago

Okay, so this makes a lot of progress on testing - it looks like a good majority of the with auth tests are working on most platforms now, with the exception of macOS and ubuntu-R-devel.

macOS tests have failed mostly because of GH API limitations. Not sure if those could/should be caught more gracefully.

I'm not as sure about what's going on with the ubuntu-devel problem - it looks like there's some weird locale things going on in the runner setup? resolved

Either way, I think this gives a better basis of testing than before (where a lot of the tests weren't being run), so if we're in a hurry this version can be submitted to CRAN, perhaps? None of these tests will be run on CRAN because skip_if_offline never runs on CRAN.

cboettig commented 2 years ago

:tada:

cboettig commented 2 years ago

This looks good, going to go ahead and merge so we can proceed with the next release.

Just a few thoughts/questions here about token use down the road that I couldn't tell from a quick read through:

Looks like this is using a custom token you have minted? I think it should be possible to use the GITHUB_TOKEN that GH-Actions auto-generates for the repo instead? Also, do the failing tests on mac have a GITHUB_TOKEN available?

tanho63 commented 2 years ago

I think it should be possible to use the GITHUB_TOKEN that GH-Actions auto-generates for the repo instead?

The GITHUB_TOKEN did not seem to allow creating new releases or uploading them? There's a scoping problem within the runner token I think. Needed to switch to a private repo token and so I decided to switch to uploading to my fork of piggyback rather than the main one - reduces likelihood of garbage being added to this repo's releases, and also lets us better track package version history here (rather than having it diluted with data upload/download)

Also, do the failing tests on mac have a GITHUB_TOKEN available?

I wrote some tests to make sure that we could download without a GITHUB_TOKEN available (seeing as there've been some past errors), e.g.

This helps make sure that the desired behaviour will still work, but does expose us a bit to GH rate limits. Since this only runs here on GitHub Actions, we'd need to rerun any failures but it won't have any effect on CRAN (all tests skipped)