Closed szabgab closed 2 years ago
Thanks but I have currently no use for Github actions for this repo.
Do you run some other form of Continuous Integration?
Yes, the manual kind locally on every commit since the test suite only takes ~2-3 seconds.
My reasons for having a CI system go beyond reducing time. It allows me to run the tests on different Operating Systems and different versions of the language I use, in this case Ruby without the need for any installation and maintenance locally. It also ensures that the test are run even if I forget to run locally and they run on Pull-requests even if the author does not run them on their machine giving them faster feedback.
I may introduce some form of CI if things get more complicated but currently it works fine.
Such CI would also catch regressions and issues on other Ruby versions than the single one you use locally (I assume you test a single version locally most of the times, correct me if I'm wrong). For instance https://github.com/oracle/truffleruby/issues/2770 would have been noticed much earlier if there was GitHub Actions running on this repo like in https://github.com/gettalong/hexapdf/pull/161 (https://github.com/eregon/truffleruby-gem-tracker/ would have noticed it automatically). And probably some incompatibility with ruby-head or Ruby previews or older/newer CRuby versions would be found that way too.
It would also make it much easier and motivating if anyone wants to contribute to this repository (I'd say a public CI is very important for any public project). No CI means no guarantee it works on any version, because contributors do not know which Ruby version you use locally, and even if they do it's only that combination and no others.
What's the concrete problem(s) of adding GitHub Actions CI runs? Checking in CI a small file like here is very common (and it's good to ensure the CI config is in sync with the code, e.g., which Ruby versions are supported), and it won't change that much, so that doesn't feel like a big problem, but maybe I'm missing something? (https://github.com/gettalong/hexapdf/issues/156#issuecomment-938765184). We could also make it daily/weekly or so if per commit is annoying for some reason.
@eregon Locally I test against 2.6.x, 2.7.x, 3.0.x, 3.1.x and 3.2.x, at least once before release via a dependency in the Rakefile but often times also in between releases.
Yeah, that comment in #156 is still the main reason... and probably sounds a bit silly to many.
I will try something out and then circle back to this.
Looking at that comment, I think having the CI configuration in git provides a lot of other benefits as well. Not only that it can be easily observed by other, but that it is forked together with the repository and it is also versioned together with the code-base. It also makes it easy to change the CI along with the code in a branch. Just to add a few more points in favor of having the CI configuration in the repo.
A CI run shows that for instance 2.5 does not work anymore (even though the README and gemspec say ">= 2.5"): https://github.com/eregon/hexapdf/actions/runs/3437414326/jobs/5732136128
@szabgab @eregon So this is how I would do it: https://github.com/gettalong/hexapdf/actions/runs/3445382887 TruffleRuby is not in the list since it fails as per the linked issue.
That looks good and would be a good addition :)
For TruffleRuby that issue should be fixed very soon, however there are still a couple other failures IIRC.
We could add it as continue-on-failure on the bundle exec rake
step, so it would keep the whole workflow green but still run and makes it easy to detect when it changes between passing and failing. Or we could wait until all tests pass and then add it. Anyway we can figure that out later.
@eregon I would rather only include implementations that work. So once everything works on TruffleRuby we can add it.
Yeah that's fine. Having GitHub Actions running in this repo would be more motivating to fix the CI for hexapdf on TruffleRuby too :)
I noticed now, a workflow was added in https://github.com/gettalong/hexapdf/commit/1c9f55698d7bc618c07067dc65418e943dd4b09d, great :)
This may also be indirectly relevant for other projects, such as natalie - https://github.com/natalie-lang/natalie. They are nowhere near as far along the way as truffleruby is, but they are coming along slowly (more and more tests pass there).
On ruby 3.0 all tests pass. On both 2.6 and 2.7 the test coverage is only
12416 / 12417 LOC (99.99%) covered.
and so it fails. You might want to disable running the CI on 2.6. and 2.7 until this can be fixed.