Own-and-Ship / oas_agent

The Own & Ship Ruby agent
2 stars 0 forks source link

Test against multiple versions of Rails #36

Open caius opened 11 months ago

caius commented 11 months ago

We have testing against multiple version of Ruby wired up, both for local use and in CI but we also need to test against multiple versions of Rails.

Initially just on the latest stable ruby release for a given Rails release is acceptable, but we may want to test against multiple rubies on multiples railsies at a later date.

Fast Ruby have a good Ruby and Rails compatibility table

Initially we'll target:

Rails Ruby
Rails 7.1 Ruby 3.2
Rails 7.0 Ruby 3.2
Rails 6.1 Ruby 3.2
Rails 6.0 Ruby 2.7
caius commented 11 months ago

Created https://github.com/Own-and-Ship/junction for this to live in.

Many rails coming together is a junction 🤭

caius commented 10 months ago

Thinking about it I wonder if we could build an omnibus docker image with Ruby 3.2.2/test suite gems installed, as well as rbenv? asdf? with the other rubies we want to test on installed, and all the rails gems installed in their respective rubies.

Could potentially have them all pointing to an oas_agent clone within the image too, so we could bind-mount over that locally for easier testing in development without needing all the rubies installed. Will help when we get back to < Ruby 2.2 on latest macOS.

Future improvements though, we should be able to sort out Rails 5.2+ without needing that.

caius commented 10 months ago

Junction is working fine locally, but broken in GitHub CI. Found a bug where we weren't using the right version of ruby when executing the tests but have fixed that now.

Started spiking out a docker-based version, although we could lean on rbenv-gemsets to solve it as well - I think there's a conflict between Rails 7.1 dependencies and Rails 6.1 dependencies in the same global ruby gem set for some reason (😟). Errors out on rackup not being compatible, even though Rails controls all the dependencies being installed 🤷