diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2183cdee..7413d08d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,29 +23,32 @@ jobs: bundle exec rake translatable_benchmark bundle exec rake slotable_benchmark test: + name: test (Rails ${{ matrix.rails_version }}, Ruby ${{ matrix.ruby_version }}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: - rails_version: ['5.2.6', '6.0.4.4', '6.1.4.4', '7.0.1', 'main'] + rails_version: ['5.2', '6.0', '6.1', '7.0', 'main'] ruby_version: ['2.5', '2.6', '2.7', '3.0', '3.1'] exclude: - - rails_version: '5.2.6' + - rails_version: '5.2' ruby_version: '3.0' - - rails_version: '5.2.6' + - rails_version: '5.2' ruby_version: '3.1' - - rails_version: '6.0.4.4' + - rails_version: '6.0' ruby_version: '3.0' - - rails_version: '6.0.4.4' + - rails_version: '6.0' ruby_version: '3.1' - - rails_version: '7.0.1' + - rails_version: '7.0' ruby_version: '2.5' - - rails_version: '7.0.1' + - rails_version: '7.0' ruby_version: '2.6' - rails_version: 'main' ruby_version: '2.5' - rails_version: 'main' ruby_version: '2.6' + env: + BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails_version }}.gemfile steps: - uses: actions/checkout@master - name: Setup Ruby @@ -55,12 +58,13 @@ jobs: - uses: actions/cache@v2 with: path: vendor/bundle - key: gems-build-rails-${{ matrix.rails_version }}-ruby-${{ matrix.ruby_version }}-${{ hashFiles('**/Gemfile.lock') }} + key: gems-build-rails-${{ matrix.rails_version }}-ruby-${{ matrix.ruby_version }}-${{ hashFiles('gemfiles/rails_${{ matrix.rails_version }}.gemfile') }} - name: Build and test with Rake run: | bundle config path vendor/bundle - bundle update - bundle exec rake + bundle + bundle exec appraisal rails-${{ matrix.rails_version }} bundle + bundle exec appraisal rails-${{ matrix.rails_version }} rake env: MEASURE_COVERAGE: true RAILS_VERSION: ${{ matrix.rails_version }} diff --git a/Appraisals b/Appraisals index 49b939039..127aa40bb 100644 --- a/Appraisals +++ b/Appraisals @@ -24,7 +24,7 @@ appraise "rails-7.0" do gem "tailwindcss-rails", "~> 2.0" end -appraise "rails-head" do +appraise "rails-main" do gem "rails", github: "rails/rails", branch: "main" gem "tailwindcss-rails", "~> 2.0" end diff --git a/Gemfile b/Gemfile index d6c00cca4..fcaf51c37 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,10 @@ rails_version = "#{ENV['RAILS_VERSION'] || 'main'}" gem "capybara", "~> 3" gem "rails", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +group :development, :test do + gem "appraisal", github: "excid3/appraisal", branch: "fix-bundle-env" +end + if RUBY_VERSION >= "3.1" gem "net-imap", require: false gem "net-pop", require: false diff --git a/Gemfile.lock b/Gemfile.lock index dc19791f6..8a9e6a111 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,74 +1,84 @@ +GIT + remote: https://github.com/excid3/appraisal.git + revision: 14855fc54ce88b42def871ce8bfd4259fbf06043 + branch: fix-bundle-env + specs: + appraisal (2.4.1) + bundler + rake + thor (>= 0.14.0) + PATH remote: . specs: - view_component (2.48.0) + view_component (2.49.0) activesupport (>= 5.0.0, < 8.0) method_source (~> 1.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.0.1) - actionpack (= 7.0.1) - activesupport (= 7.0.1) + actioncable (7.0.2.2) + actionpack (= 7.0.2.2) + activesupport (= 7.0.2.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.1) - actionpack (= 7.0.1) - activejob (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + actionmailbox (7.0.2.2) + actionpack (= 7.0.2.2) + activejob (= 7.0.2.2) + activerecord (= 7.0.2.2) + activestorage (= 7.0.2.2) + activesupport (= 7.0.2.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.1) - actionpack (= 7.0.1) - actionview (= 7.0.1) - activejob (= 7.0.1) - activesupport (= 7.0.1) + actionmailer (7.0.2.2) + actionpack (= 7.0.2.2) + actionview (= 7.0.2.2) + activejob (= 7.0.2.2) + activesupport (= 7.0.2.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.1) - actionview (= 7.0.1) - activesupport (= 7.0.1) + actionpack (7.0.2.2) + actionview (= 7.0.2.2) + activesupport (= 7.0.2.2) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.1) - actionpack (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + actiontext (7.0.2.2) + actionpack (= 7.0.2.2) + activerecord (= 7.0.2.2) + activestorage (= 7.0.2.2) + activesupport (= 7.0.2.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.1) - activesupport (= 7.0.1) + actionview (7.0.2.2) + activesupport (= 7.0.2.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.1) - activesupport (= 7.0.1) + activejob (7.0.2.2) + activesupport (= 7.0.2.2) globalid (>= 0.3.6) - activemodel (7.0.1) - activesupport (= 7.0.1) - activerecord (7.0.1) - activemodel (= 7.0.1) - activesupport (= 7.0.1) - activestorage (7.0.1) - actionpack (= 7.0.1) - activejob (= 7.0.1) - activerecord (= 7.0.1) - activesupport (= 7.0.1) + activemodel (7.0.2.2) + activesupport (= 7.0.2.2) + activerecord (7.0.2.2) + activemodel (= 7.0.2.2) + activesupport (= 7.0.2.2) + activestorage (7.0.2.2) + actionpack (= 7.0.2.2) + activejob (= 7.0.2.2) + activerecord (= 7.0.2.2) + activesupport (= 7.0.2.2) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.1) + activesupport (7.0.2.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -76,10 +86,6 @@ GEM addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ansi (1.5.0) - appraisal (2.4.1) - bundler - rake - thor (>= 0.14.0) ast (2.4.2) benchmark-ips (2.8.4) better_html (1.0.16) @@ -120,13 +126,13 @@ GEM temple (>= 0.8.0) tilt html_tokenizer (0.0.7) - i18n (1.8.11) + i18n (1.10.0) concurrent-ruby (~> 1.0) io-wait (0.2.1) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - loofah (2.13.0) + loofah (2.14.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -167,35 +173,35 @@ GEM rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (7.0.1) - actioncable (= 7.0.1) - actionmailbox (= 7.0.1) - actionmailer (= 7.0.1) - actionpack (= 7.0.1) - actiontext (= 7.0.1) - actionview (= 7.0.1) - activejob (= 7.0.1) - activemodel (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + rails (7.0.2.2) + actioncable (= 7.0.2.2) + actionmailbox (= 7.0.2.2) + actionmailer (= 7.0.2.2) + actionpack (= 7.0.2.2) + actiontext (= 7.0.2.2) + actionview (= 7.0.2.2) + activejob (= 7.0.2.2) + activemodel (= 7.0.2.2) + activerecord (= 7.0.2.2) + activestorage (= 7.0.2.2) + activesupport (= 7.0.2.2) bundler (>= 1.15.0) - railties (= 7.0.1) + railties (= 7.0.2.2) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (7.0.1) - actionpack (= 7.0.1) - activesupport (= 7.0.1) + railties (7.0.2.2) + actionpack (= 7.0.2.2) + activesupport (= 7.0.2.2) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.2.0) + regexp_parser (2.2.1) rexml (3.2.5) rubocop (1.13.0) parallel (~> 1.10) @@ -206,7 +212,7 @@ GEM rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) + rubocop-ast (1.15.2) parser (>= 3.0.1.1) rubocop-github (0.16.2) rubocop (<= 1.13.0) @@ -259,13 +265,13 @@ GEM webrick (~> 1.7.0) yard-activesupport-concern (0.0.1) yard (>= 0.8) - zeitwerk (2.5.3) + zeitwerk (2.5.4) PLATFORMS ruby DEPENDENCIES - appraisal (~> 2.4) + appraisal! benchmark-ips (~> 2.8.2) better_html (~> 1) bundler (>= 1.15.0) @@ -274,9 +280,6 @@ DEPENDENCIES haml (~> 5) jbuilder (~> 2) minitest (= 5.6.0) - net-imap - net-pop - net-smtp pry (~> 0.13) rails (~> 7.0.0) rake (~> 13.0) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index c7db707b2..f2ad8c215 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,6 +7,10 @@ title: Changelog ## main +* Update CI configuration to use `Appraisal`. + + *Hans Lemuet* + * Use a dedicated deprecation instance, silence it while testing *Max Beizer, Hans Lemuet, Elia Schito* diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_5.2.gemfile index 56ee0723f..6fb3ab202 100644 --- a/gemfiles/rails_5.2.gemfile +++ b/gemfiles/rails_5.2.gemfile @@ -5,4 +5,8 @@ source "https://rubygems.org" gem "capybara", "~> 3" gem "rails", "~> 5.2.0" +group :development, :test do + gem "appraisal", github: "excid3/appraisal", branch: "fix-bundle-env" +end + gemspec path: "../" diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index ac8cea8ca..35fa801eb 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -6,4 +6,8 @@ gem "capybara", "~> 3" gem "rails", "~> 6.0.0" gem "tailwindcss-rails", "~> 2.0" +group :development, :test do + gem "appraisal", github: "excid3/appraisal", branch: "fix-bundle-env" +end + gemspec path: "../" diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index 3280ead1b..e4b5ef392 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -9,4 +9,8 @@ gem "net-smtp", require: false gem "net-imap", require: false gem "net-pop", require: false +group :development, :test do + gem "appraisal", github: "excid3/appraisal", branch: "fix-bundle-env" +end + gemspec path: "../" diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index 72345f4ca..b07ee137b 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -6,4 +6,8 @@ gem "capybara", "~> 3" gem "rails", "~> 7.0.0" gem "tailwindcss-rails", "~> 2.0" +group :development, :test do + gem "appraisal", github: "excid3/appraisal", branch: "fix-bundle-env" +end + gemspec path: "../" diff --git a/gemfiles/rails_head.gemfile b/gemfiles/rails_main.gemfile similarity index 65% rename from gemfiles/rails_head.gemfile rename to gemfiles/rails_main.gemfile index 8431b9a11..76155a0f8 100644 --- a/gemfiles/rails_head.gemfile +++ b/gemfiles/rails_main.gemfile @@ -6,4 +6,8 @@ gem "capybara", "~> 3" gem "rails", github: "rails/rails", branch: "main" gem "tailwindcss-rails", "~> 2.0" +group :development, :test do + gem "appraisal", github: "excid3/appraisal", branch: "fix-bundle-env" +end + gemspec path: "../"