From 451ff6d49c71e543962d2b29d77f2e744b2d47e1 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Fri, 25 Feb 2022 14:44:26 -0300 Subject: [PATCH] Reorganize test matrix & use latest bundler * 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. --- .github/workflows/test.yml | 226 ++++++++++++++++++------------------- Gemfile.lock | 2 +- gemfiles/Gemfile-rails-6-1 | 2 +- 3 files changed, 112 insertions(+), 118 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e212d738f8..7d5d080bb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} diff --git a/Gemfile.lock b/Gemfile.lock index 21b998364c..82ddc2725d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -239,4 +239,4 @@ DEPENDENCIES webrat (= 0.7.3) BUNDLED WITH - 2.3.4 + 2.3.8 diff --git a/gemfiles/Gemfile-rails-6-1 b/gemfiles/Gemfile-rails-6-1 index 8a8991fe0e..baa4827c28 100644 --- a/gemfiles/Gemfile-rails-6-1 +++ b/gemfiles/Gemfile-rails-6-1 @@ -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