Skip to content

Commit

Permalink
Reorganize test matrix & use latest bundler
Browse files Browse the repository at this point in the history
* Rails and Ruby versions follow the most recent to oldest, except for
  Rails main, so we can keep the Gemfile the first one.
* Excluding specific matrix combinations based on the Gemfile first,
  Ruby version next, and keep the same order (most recent -> oldest)
* Quote all Ruby versions to keep things consistent. It's required for
  the '3.0' version to avoid the float issue where it'd use the latest
  3.x instead.
  • Loading branch information
carlosantoniodasilva committed Feb 25, 2022
1 parent 542df36 commit 451ff6d
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 118 deletions.
226 changes: 110 additions & 116 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,127 +16,121 @@ jobs:
- gemfiles/Gemfile-rails-4-2
- gemfiles/Gemfile-rails-4-1
ruby:
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
- '3.1'
- '3.0'
- 3.1
- '2.7'
- '2.6'
- '2.5'
- '2.4'
- '2.3'
- '2.2'
- '2.1'
env:
- DEVISE_ORM=active_record
- DEVISE_ORM=mongoid
exclude:
- ruby: 2.1
gemfile: Gemfile
- ruby: 2.1
gemfile: gemfiles/Gemfile-rails-6-0
- ruby: 2.1
gemfile: gemfiles/Gemfile-rails-6-1
- ruby: 2.1
gemfile: gemfiles/Gemfile-rails-main
- ruby: 2.1
gemfile: gemfiles/Gemfile-rails-5-2
- ruby: 2.1
gemfile: gemfiles/Gemfile-rails-5-1
- ruby: 2.1
gemfile: gemfiles/Gemfile-rails-5-0
- ruby: 2.2
gemfile: Gemfile
- ruby: 2.2
gemfile: gemfiles/Gemfile-rails-6-0
- ruby: 2.2
gemfile: gemfiles/Gemfile-rails-6-1
- ruby: 2.2
gemfile: gemfiles/Gemfile-rails-main
- ruby: 2.2
gemfile: gemfiles/Gemfile-rails-5-2
- ruby: 2.3
gemfile: Gemfile
- ruby: 2.3
gemfile: gemfiles/Gemfile-rails-6-0
- ruby: 2.3
gemfile: gemfiles/Gemfile-rails-6-1
- ruby: 2.3
gemfile: gemfiles/Gemfile-rails-main
- ruby: 2.4
gemfile: Gemfile
- ruby: 2.4
gemfile: gemfiles/Gemfile-rails-6-0
- ruby: 2.4
gemfile: gemfiles/Gemfile-rails-6-1
- ruby: 2.4
gemfile: gemfiles/Gemfile-rails-main
- ruby: 2.4
gemfile: gemfiles/Gemfile-rails-4-1
- ruby: 2.5
gemfile: gemfiles/Gemfile-rails-4-1
- ruby: 2.5
gemfile: gemfiles/Gemfile-rails-main
- ruby: 2.5
gemfile: Gemfile
- ruby: 2.6
gemfile: gemfiles/Gemfile-rails-4-1
- ruby: 2.6
gemfile: gemfiles/Gemfile-rails-4-2
- ruby: 2.6
gemfile: Gemfile
- ruby: 2.6
gemfile: gemfiles/Gemfile-rails-main
- ruby: 2.7
gemfile: gemfiles/Gemfile-rails-4-1
- ruby: 2.7
gemfile: gemfiles/Gemfile-rails-4-2
- ruby: 2.7
gemfile: gemfiles/Gemfile-rails-5-0
- ruby: 2.7
gemfile: gemfiles/Gemfile-rails-5-1
- ruby: 2.7
gemfile: gemfiles/Gemfile-rails-5-2
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails-4-1
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails-4-2
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails-5-0
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails-5-1
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails-5-2
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-5-1
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-5-2
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-4-1
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-4-2
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-5-0
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-5-1
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-5-2
- ruby: 3.1
gemfile: gemfiles/Gemfile-rails-6-0
- env: DEVISE_ORM=mongoid
gemfile: Gemfile
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile-rails-5-0
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile-rails-5-1
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile-rails-5-2
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile-rails-6-0
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile-rails-6-1
- env: DEVISE_ORM=mongoid
gemfile: Gemfile
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile-rails-main
- gemfile: Gemfile
ruby: '2.6'
- gemfile: Gemfile
ruby: '2.5'
- gemfile: Gemfile
ruby: '2.4'
- gemfile: Gemfile
ruby: '2.3'
- gemfile: Gemfile
ruby: '2.2'
- gemfile: Gemfile
ruby: '2.1'
- gemfile: Gemfile
env: DEVISE_ORM=mongoid
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.6'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.5'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.4'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.3'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.2'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.1'
- gemfile: gemfiles/Gemfile-rails-main
env: DEVISE_ORM=mongoid
- gemfile: gemfiles/Gemfile-rails-6-1
ruby: '2.4'
- gemfile: gemfiles/Gemfile-rails-6-1
ruby: '2.3'
- gemfile: gemfiles/Gemfile-rails-6-1
ruby: '2.2'
- gemfile: gemfiles/Gemfile-rails-6-1
ruby: '2.1'
- gemfile: gemfiles/Gemfile-rails-6-1
env: DEVISE_ORM=mongoid
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '2.4'
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '2.3'
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '2.2'
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '2.1'
- gemfile: gemfiles/Gemfile-rails-6-0
env: DEVISE_ORM=mongoid
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '3.0'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '2.7'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '2.2'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '2.1'
- gemfile: gemfiles/Gemfile-rails-5-2
env: DEVISE_ORM=mongoid
- gemfile: gemfiles/Gemfile-rails-5-1
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-5-1
ruby: '3.0'
- gemfile: gemfiles/Gemfile-rails-5-1
ruby: '2.7'
- gemfile: gemfiles/Gemfile-rails-5-1
ruby: '2.1'
- gemfile: gemfiles/Gemfile-rails-5-1
env: DEVISE_ORM=mongoid
- gemfile: gemfiles/Gemfile-rails-5-0
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-5-0
ruby: '3.0'
- gemfile: gemfiles/Gemfile-rails-5-0
ruby: '2.7'
- gemfile: gemfiles/Gemfile-rails-5-0
ruby: '2.1'
- gemfile: gemfiles/Gemfile-rails-5-0
env: DEVISE_ORM=mongoid
- gemfile: gemfiles/Gemfile-rails-4-2
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-4-2
ruby: '3.0'
- gemfile: gemfiles/Gemfile-rails-4-2
ruby: '2.7'
- gemfile: gemfiles/Gemfile-rails-4-2
ruby: '2.6'
- gemfile: gemfiles/Gemfile-rails-4-1
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-4-1
ruby: '3.0'
- gemfile: gemfiles/Gemfile-rails-4-1
ruby: '2.7'
- gemfile: gemfiles/Gemfile-rails-4-1
ruby: '2.6'
- gemfile: gemfiles/Gemfile-rails-4-1
ruby: '2.5'
- gemfile: gemfiles/Gemfile-rails-4-1
ruby: '2.4'
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,4 @@ DEPENDENCIES
webrat (= 0.7.3)

BUNDLED WITH
2.3.4
2.3.8
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails-6-1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gem "rails-controller-testing", github: "rails/rails-controller-testing"

gem "responders", "~> 3.0"

if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new("3.1")
if RUBY_VERSION >= "3.1"
gem "net-smtp", require: false
gem "net-imap", require: false
gem "net-pop", require: false
Expand Down

1 comment on commit 451ff6d

@the514
Copy link

@the514 the514 commented on 451ff6d Apr 2, 2022 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.