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

Make it easier to run all tests across all appraisals locally #181

Open
mcmire opened this issue Feb 11, 2023 · 0 comments
Open

Make it easier to run all tests across all appraisals locally #181

mcmire opened this issue Feb 11, 2023 · 0 comments

Comments

@mcmire
Copy link
Collaborator

mcmire commented Feb 11, 2023

We want to make sure that super_diff works with as many versions of Ruby, Rails, and RSpec versions as possible. To this end, within the test suite for super_diff, we use the Appraisal gem to maintain a set of gemfiles crafted to represent particular combinations of Rails and RSpec versions.

The best way to run these tests is in CI, where we can easily specify multiple Ruby versions to complete the picture. Running the same tests locally is very difficult, however. On top of this, maintaining these appraisals in the first place is also very difficult. Because more recent of Rails and RSpec have dropped support for earlier versions of Ruby, in order to generate all of the appraisals, you must switch to Ruby 2.7.7. This is somewhat impossible to do on recent versions of macOS, as there is something with the new ARM CPUs that broke compilation. I can somehow do this on my work laptop, but my personal laptop will not compile Ruby 2.7.7 (specifically the RBS gem).

All this to say, I think all of this pain could be solved by using Docker for development. We could eliminate a couple of variables (Ruby version manager and operating system), and we wouldn't have to maintain a setup script. We could even employ act, which uses Docker as well, run the GitHub Action workflow locally as well. Further down the road, we may not even need Appraisal, but that's a decision for another day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant