r-transit / tidytransit

R package for working with GTFS data
https://r-transit.github.io/tidytransit/
150 stars 22 forks source link

add github workflows #151

Closed mpadge closed 4 years ago

mpadge commented 4 years ago

Many folk including myself are finding github actions pretty impressive for a range of standard CI tasks. This PR adds a matrix workflow for R CMD check on a host of OSs, along with a test coverage workflow, essentially copied straight from my workflow files for gtfsrouter. You can see the typical output for that repo here. No worries if you'd prefer not to merge this PR, but I just thought it might help.

tbuckl commented 4 years ago

thank you @mpadge! i had not heard of workflows. seems like it should be helpful. will look into it before merging.

mpadge commented 4 years ago

No worries @tbuckl - one only slightly unfortunate aspect is you can see the effect of a PR via github workflows (because the PR itself is set up so you can see PR results before merging), but only once the action has been installed which first requires merging this PR. Once that's done, you'll be able to examine results of each PR in arbitrarily fine detail - you could even set up a separate workflow for PRs with much stricter controls than what you as core devs might impose on yourself. For example, you can have an entirely separate test suite for PRs only, and run that only on a PR workflow.

More generally: actions are an attempt by github to own the entire market established by travis, circle, and all others, so there might be a strong ethical argument against merging this, because it is certain death for those alternative services, and travis is still an independent business run outta :de:. To the extent that one is happy to ignore that, those business were really only ever about typical CI tasks like running tests and checks. In comparison, actions are approximately infinitely more powerful, configurable, and customisable. I would have loved travis to have "won" this battle, but frankly, github has just done an way better job of thinking truly deeply and creatively about what is possible both now and in the future. This PR is just a glimpse into that world.

If you want to see, I'd suggest just merging, and deleting later if you decide it's not for you. As soon as you've merged, the actions will switch on and you'll see the results. As soon as you delete the .github/workflows folder, the actions will stop. And if you decide to keep, you can put badges for any individual step you want, or just a single master badge, on the README and replace all other other badges from separate services.

tbuckl commented 4 years ago

thanks @mpadge sounds like @polettif if into it and i don't see why not. i'm going to merge and we can always change back later.

mpadge commented 4 years ago

Thanks @tbuckl. Note that one of the workflow is codecov, so you could now set up a code coverage badge for that too if you want.