-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Test against multiple Rails versions #647
Merged
cjlarose
merged 12 commits into
ruby-shoryuken:master
from
cjlarose:add-multiple-rails-versions-to-test-matrix
Jan 27, 2021
Merged
Test against multiple Rails versions #647
cjlarose
merged 12 commits into
ruby-shoryuken:master
from
cjlarose:add-multiple-rails-versions-to-test-matrix
Jan 27, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The .gemfile files generated by `appraisal install` are checked-in to git, but the .gemfile.lock files are ignored, matching appraisal's recommendation. The list of Rails versions was determined by Rails' [maintenance policy][0], including everything in "severe security issues". In addition, support for Rails 4.2 is included, despite it being EOL'd by Rails. Removal of support for Rails 4.2 in shoryuken would be considered a breaking change, so we'll keep support for now. [0]: https://guides.rubyonrails.org/maintenance_policy.html
CI and appraisal can be used to run the suite against older versions. By default, we want to run the suite against the latest released version.
Executing `bundle exec rake rails_specs` will run the subset of specs that use ActiveJob. We'll run this suite against different versions of Rails on CI. Locally, devs can execute `bundle exec appraisal rake rails_specs` to run the Rails suite against all supported versions of Rails.
On Travis, we'll run the Rails test suite against all supported versions of Rails. In order to avoid running too many jobs in Travis, we only run each Rails version against a single Ruby version. The Ruby version for each suite was determined by latest stable version compatible with the Rails version. The [compatibility matrix on the fastruby blog][0] is a good reference for this. [0]: https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
This version includes a handy `remove_gem` feature
This is to make it possible to remove the gem from some appraisals
On CI, we run Rails 4.2 against Ruby 2.2. Recent versions of pry-byebug don't support Ruby 2.2 and getting old versions to run is tricky. Instead, we just run the suite without the gem.
appraisal 2.2 is the latest version that still supports Ruby 2.2
dee647d
to
72c1e04
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before, we were running all tests against an older ActiveJob version (Rails 4.2). This change runs Rails-related tests against 4.2, 5.2, 6.0, and 6.1.
I'm interested in adding deeper integration tests for Rails applications and making some changes to how we interact with ActiveJob in order to support things like #646. Making it so that we run tests against many different Rails versions is an important prerequisite to guard against regressions.