Skip to content

Commit

Permalink
ci: Add Rails 7.2 and Ruby 3.3 to testing matrix (#1032)
Browse files Browse the repository at this point in the history
* chore: Fix deprecation warnings

* test: Add spec for BackDoor middleware

* ci: Run tests against Rails 7.2 and Ruby 3.3

* chore: Fix rack deprecation warning in BackDoor middleware

* test: Use default settings of Rails version under test

Standardizes the setup of the dummy application for testing purposes.
This simplifies the configuration and removes some of the monkey-patching
that was necessary in the old setup.

* test: Remove dependency on timecop gem

Use ActiveSupport::Testing::TimeHelpers instead
  • Loading branch information
hasghari authored Oct 29, 2024
1 parent 17654b8 commit 767c002
Show file tree
Hide file tree
Showing 34 changed files with 326 additions and 285 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ jobs:
- "6.1"
- "7.0"
- "7.1"
- "7.2"
ruby:
- "3.0.4"
- "3.1.2"
- "3.2.2"
- "3.0.7"
- "3.1.6"
- "3.2.5"
- "3.3.4"
exclude:
- gemfile: "7.2"
ruby: "3.0.7"

env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile
Expand All @@ -39,8 +44,8 @@ jobs:

- name: "Reset app database"
run: |
bundle exec rake dummy:db:drop
bundle exec rake dummy:db:setup
bundle exec rake db:drop
bundle exec rake db:setup
- name: "Run tests"
run: bundle exec rake
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
*.swp
*~
.bundle
db/*.sqlite3
.idea
.tool-versions
spec/dummy/db/*.sqlite3*
spec/dummy/log
gemfiles/*.lock
gemfiles/vendor/
log/*.log
Expand Down
14 changes: 14 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
appraise "rails_6.1" do
gem "railties", "~> 6.1.0"
gem "net-smtp", require: false # not bundled in ruby 3.1
# The following gems will not be bundled with Ruby 3.4
gem "base64", require: false
gem "bigdecimal", require: false
gem "drb", require: false
gem "mutex_m", require: false
end

appraise "rails_7.0" do
gem "railties", "~> 7.0.0"
# The following gems will not be bundled with Ruby 3.4
gem "base64", require: false
gem "bigdecimal", require: false
gem "drb", require: false
gem "mutex_m", require: false
end

appraise "rails_7.1" do
gem "railties", "~> 7.1.0"
end

appraise "rails_7.2" do
gem "railties", "~> 7.2.0"
end
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ gem 'rails-controller-testing'
gem 'rspec-rails'
gem 'shoulda-matchers'
gem 'sqlite3', '~> 1.7'
gem 'timecop'
Loading

0 comments on commit 767c002

Please sign in to comment.