R-package icon indicating copy to clipboard operation
R-package copied to clipboard

implement CI

Open ohagen opened this issue 3 years ago • 16 comments

previously relying on Travis, now we need another solution. Specially if we want to improve collaboration

ohagen avatar Apr 19 '21 19:04 ohagen

Great idea! If you want, I volunteer to add a GitHub Actions script by Pull Request to do the same things as the Travis CI one. I have much experience with both CI's, so that would be easy. Also, Gen3sis seems awesome to me!

richelbilderbeek avatar Jun 22 '21 11:06 richelbilderbeek

Hi Oskar, for me Travis CI still works without charge when switching to .com, despite their announcement that you have only 100h or so free.

We have switched a part to GH actions though, have a look at https://github.com/TheoreticalEcology/s-jSDM/tree/master/.github, for example.

florianhartig avatar Jun 22 '21 12:06 florianhartig

Hi @richelbilderbeek and welcome! So nice to see you here! This would be really great.. feel free to pick a solution that you think works the best. @florianhartig thanks for the info.

ohagen avatar Jun 23 '21 02:06 ohagen

@ohagen awesome! I created Pull Request #51 to fix this Issue :-)

richelbilderbeek avatar Jun 23 '21 05:06 richelbilderbeek

Thanks @richelbilderbeek! I see that you submitted to the main branch and we plan for now on to work on the development branch. Not sure if you can easily submit to this other branch? Since @benj919 work on the CI, can you Beji check is this in accordance and accept the merge? Thanks again @richelbilderbeek

ohagen avatar Jun 23 '21 07:06 ohagen

Hi @ohagen, you are right, silly me, I should have worked on develop. I will close this PR and create a new one on develop today :-)

richelbilderbeek avatar Jun 23 '21 08:06 richelbilderbeek

fwiw, from my perspective it would be most sensible to push this into the main branch and then update to the other branches. There is no reason that this shouldn't go into main directly, as this should also be tested. This will not be exported with the package, it's just the test.

florianhartig avatar Jun 23 '21 08:06 florianhartig

Probably it doesn't matter though. I just don't know if the main branch will be tested as long as there is no action folder present.

florianhartig avatar Jun 23 '21 08:06 florianhartig

I think it might even be necessary to have a new workflow in the main branch, see https://github.community/t/workflow-files-only-picked-up-from-master/16129

florianhartig avatar Jun 23 '21 08:06 florianhartig

The main folder will be tested directly at acceptance. Adding a build badge to show off the build status can be added to develop first :-)

richelbilderbeek avatar Jun 23 '21 08:06 richelbilderbeek

Welcome @richelbilderbeek and thank you for that workflow. I haven't worked with github actions yet, though your pull request looks good on a first glance (If limited to Macos runs if I interpret that correctly ;) ).

@ohagen @florianhartig If I understood the travis changes correctly they were not applied equally to all repos: as an open source and/or academic project it should be possible for us do "just" request more free credits from them either manually or semi regularly. They cut off the unlimited free for all after some crypto-mining related abuse. I personally have no preference to either travis or github actions, though I like the github actions setup with the full actions code under git in one place.

Does anyone know the pricing/allowances/conditions on using github actions?

benj919 avatar Jun 23 '21 10:06 benj919

I haven't worked with github actions yet, though your pull request looks good on a first glance (If limited to Macos runs if I interpret that correctly ;) ).

Notice how little I did: one R command, then adding one markdown, to DESCRIPTION :-) . Personally, I always use simpler ones, but I think these are just as good.

@benj919 I know Travis CI hands out free credits, but they are slow -think months!- to respond, and this only includes repos I have had a response from; there are still some of mine pending.

GitHub Actions is free for public repos. If you pay for GitHub (i.e. you are a GitHub Pro user), GHA also works on your private repos.

richelbilderbeek avatar Jun 23 '21 10:06 richelbilderbeek

Hi @benj919

a) true, we could / should add Ubuntu as well, I think Windows is also possible. We can do this once the PR is merged though.

b) about Travis: as I said, I migrated https://github.com/florianhartig/DHARMa from travis.org to travis.com because the org builds didn't run properly any more. I expected this would run out after this free hours, but afaiks, those hours were never counted, my builts just continue to run!

Side comment: if possible, I would let Travis and GH actions run side by side, also because my experience is that they test slightly different, so it's a good check.

florianhartig avatar Jun 23 '21 10:06 florianhartig

I merged the pull request, let's see if this works out. I also reopened the issue to keep track of the next steps.

Notice how little I did: one R command, then adding one markdown, to DESCRIPTION :-) . Personally, I always use simpler ones, but I think these are just as good.

Sure, but even if it's a single line and the github actions being copied over from R somewhere it saves me/us half a day of investigating this stuff myself ;)

@florianhartig sure, running them side by side is an option as well

benj919 avatar Jun 23 '21 10:06 benj919

thanks a lot folks! Its beautiful to see this moving forward.

ohagen avatar Jun 23 '21 16:06 ohagen

Currently we have both workflows working.

Latest results are called by the README file from the latest yaml pages.

DEVELOPMENT [![R-CMD-check](https://github.com/project-gen3sis/R-package/actions/workflows/R-CMD-check.yaml/badge.svg?branch=development)](https://github.com/project-gen3sis/R-package/actions/workflows/R-CMD-check.yaml)

MASTER [![R-CMD-check](https://github.com/project-gen3sis/R-package/actions/workflows/R-CMD-check.yaml/badge.svg?branch=master)](https://github.com/project-gen3sis/R-package/actions/workflows/R-CMD-check.yaml)

still open is adding windows and linux .yaml checks

ohagen avatar May 03 '22 13:05 ohagen