diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0ad1806..a7eeca90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,14 +16,14 @@ jobs: fail-fast: false matrix: ruby: - - 2.2 - 2.3 - 2.4 - 2.5 - 2.6 - 2.7 - # - ruby-head - # - truffleruby-head + - 3.0 + - 3.1 + - 3.2 gemfile: # These are located in the gemfiles/ folder - rails42 @@ -32,30 +32,29 @@ jobs: - rails52 - rails60 - rails61 + - rails70 - rails42_haml - rails50_haml - rails51_haml - rails52_haml - rails60_haml - rails61_haml + - rails70_haml - rails42_boc - rails50_boc - rails51_boc - rails52_boc - rails60_boc - rails61_boc + - rails70_boc - rack - rack_boc # - pry09 # - pry10 # - pry11 exclude: - - { ruby: 2.2, gemfile: rails60 } - - { ruby: 2.2, gemfile: rails60_boc } - - { ruby: 2.2, gemfile: rails60_haml } - - { ruby: 2.2, gemfile: rails61 } - - { ruby: 2.2, gemfile: rails61_boc } - - { ruby: 2.2, gemfile: rails61_haml } + # Following https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html + # to decide what to include. - { ruby: 2.3, gemfile: rails42 } - { ruby: 2.3, gemfile: rails42_boc } - { ruby: 2.3, gemfile: rails42_haml } @@ -65,6 +64,9 @@ jobs: - { ruby: 2.3, gemfile: rails61 } - { ruby: 2.3, gemfile: rails61_boc } - { ruby: 2.3, gemfile: rails61_haml } + - { ruby: 2.3, gemfile: rails70 } + - { ruby: 2.3, gemfile: rails70_boc } + - { ruby: 2.3, gemfile: rails70_haml } - { ruby: 2.4, gemfile: rails42 } - { ruby: 2.4, gemfile: rails42_boc } - { ruby: 2.4, gemfile: rails42_haml } @@ -74,24 +76,99 @@ jobs: - { ruby: 2.4, gemfile: rails61 } - { ruby: 2.4, gemfile: rails61_boc } - { ruby: 2.4, gemfile: rails61_haml } + - { ruby: 2.4, gemfile: rails70 } + - { ruby: 2.4, gemfile: rails70_boc } + - { ruby: 2.4, gemfile: rails70_haml } - { ruby: 2.5, gemfile: rails42 } - { ruby: 2.5, gemfile: rails42_boc } - { ruby: 2.5, gemfile: rails42_haml } + - { ruby: 2.5, gemfile: rails70 } + - { ruby: 2.5, gemfile: rails70_boc } + - { ruby: 2.5, gemfile: rails70_haml } + - { ruby: 2.5, gemfile: rails50 } + - { ruby: 2.5, gemfile: rails50_boc } + - { ruby: 2.5, gemfile: rails50_haml } - { ruby: 2.6, gemfile: rails42 } - { ruby: 2.6, gemfile: rails42_boc } - { ruby: 2.6, gemfile: rails42_haml } + - { ruby: 2.6, gemfile: rails50 } + - { ruby: 2.6, gemfile: rails50_boc } + - { ruby: 2.6, gemfile: rails50_haml } + - { ruby: 2.6, gemfile: rails51 } + - { ruby: 2.6, gemfile: rails51_boc } + - { ruby: 2.6, gemfile: rails51_haml } + - { ruby: 2.6, gemfile: rails52 } + - { ruby: 2.6, gemfile: rails52_boc } + - { ruby: 2.6, gemfile: rails52_haml } + - { ruby: 2.6, gemfile: rails60 } + - { ruby: 2.6, gemfile: rails60_boc } + - { ruby: 2.6, gemfile: rails60_haml } + - { ruby: 2.6, gemfile: rails70 } + - { ruby: 2.6, gemfile: rails70_boc } + - { ruby: 2.6, gemfile: rails70_haml } - { ruby: 2.7, gemfile: rails42 } - { ruby: 2.7, gemfile: rails42_boc } - { ruby: 2.7, gemfile: rails42_haml } - # - { ruby: ruby-head, gemfile: rails42 } - # - { ruby: ruby-head, gemfile: rails42_boc } - # - { ruby: ruby-head, gemfile: rails42_haml } - - { ruby: truffleruby-head, gemfile: rails42_boc } - - { ruby: truffleruby-head, gemfile: rails50_boc } - - { ruby: truffleruby-head, gemfile: rails51_boc } - - { ruby: truffleruby-head, gemfile: rails52_boc } - - { ruby: truffleruby-head, gemfile: rails60_boc } - - { ruby: truffleruby-head, gemfile: rack_boc } + - { ruby: 2.7, gemfile: rails50 } + - { ruby: 2.7, gemfile: rails50_boc } + - { ruby: 2.7, gemfile: rails50_haml } + - { ruby: 2.7, gemfile: rails51 } + - { ruby: 2.7, gemfile: rails51_boc } + - { ruby: 2.7, gemfile: rails51_haml } + - { ruby: 2.7, gemfile: rails52 } + - { ruby: 2.7, gemfile: rails52_boc } + - { ruby: 2.7, gemfile: rails52_haml } + - { ruby: 2.7, gemfile: rails60 } + - { ruby: 2.7, gemfile: rails60_boc } + - { ruby: 2.7, gemfile: rails60_haml } + - { ruby: 3.0, gemfile: rails42 } + - { ruby: 3.0, gemfile: rails42_boc } + - { ruby: 3.0, gemfile: rails42_haml } + - { ruby: 3.0, gemfile: rails50 } + - { ruby: 3.0, gemfile: rails50_boc } + - { ruby: 3.0, gemfile: rails50_haml } + - { ruby: 3.0, gemfile: rails51 } + - { ruby: 3.0, gemfile: rails51_boc } + - { ruby: 3.0, gemfile: rails51_haml } + - { ruby: 3.0, gemfile: rails52 } + - { ruby: 3.0, gemfile: rails52_boc } + - { ruby: 3.0, gemfile: rails52_haml } + - { ruby: 3.0, gemfile: rails60 } + - { ruby: 3.0, gemfile: rails60_boc } + - { ruby: 3.0, gemfile: rails60_haml } + - { ruby: 3.1, gemfile: rails42 } + - { ruby: 3.1, gemfile: rails42_boc } + - { ruby: 3.1, gemfile: rails42_haml } + - { ruby: 3.1, gemfile: rails50 } + - { ruby: 3.1, gemfile: rails50_boc } + - { ruby: 3.1, gemfile: rails50_haml } + - { ruby: 3.1, gemfile: rails51 } + - { ruby: 3.1, gemfile: rails51_boc } + - { ruby: 3.1, gemfile: rails51_haml } + - { ruby: 3.1, gemfile: rails52 } + - { ruby: 3.1, gemfile: rails52_boc } + - { ruby: 3.1, gemfile: rails52_haml } + - { ruby: 3.1, gemfile: rails60 } + - { ruby: 3.1, gemfile: rails60_boc } + - { ruby: 3.1, gemfile: rails60_haml } + - { ruby: 3.2, gemfile: rails42 } + - { ruby: 3.2, gemfile: rails42_boc } + - { ruby: 3.2, gemfile: rails42_haml } + - { ruby: 3.2, gemfile: rails50 } + - { ruby: 3.2, gemfile: rails50_boc } + - { ruby: 3.2, gemfile: rails50_haml } + - { ruby: 3.2, gemfile: rails51 } + - { ruby: 3.2, gemfile: rails51_boc } + - { ruby: 3.2, gemfile: rails51_haml } + - { ruby: 3.2, gemfile: rails52 } + - { ruby: 3.2, gemfile: rails52_boc } + - { ruby: 3.2, gemfile: rails52_haml } + - { ruby: 3.2, gemfile: rails60 } + - { ruby: 3.2, gemfile: rails60_boc } + - { ruby: 3.2, gemfile: rails60_haml } + + env: + BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile steps: @@ -101,23 +178,62 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} + bundler-cache: true - - uses: actions/cache@v2 + - name: Bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + + - name: RSpec + run: bundle exec rspec -f doc --color + + test_older: + # Ruby 2.2 has a known issue on Ubuntu 22, so we must test it on Ubuntu 20 + # https://github.com/ruby/setup-ruby/issues/496 + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + ruby: + - 2.2 + gemfile: + # These are located in the gemfiles/ folder + - rails42 + - rails50 + - rails51 + - rails52 + - rails42_haml + - rails50_haml + - rails51_haml + - rails52_haml + - rails42_boc + - rails50_boc + - rails51_boc + - rails52_boc + - rack + - rack_boc + # - pry09 + # - pry10 + # - pry11 + + env: + BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile + + steps: + + - uses: actions/checkout@v2 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 with: - path: gemfiles/vendor/bundle - key: v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}-${{ hashFiles(format('gemfiles/{0}.gemfile', matrix.gemfile)) }} - restore-keys: | - v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }} - v3-${{ runner.os }}-branch-master-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }} + ruby-version: ${{ matrix.ruby }} + bundler-cache: true - name: Bundle install run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - env: - BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile - name: RSpec run: bundle exec rspec -f doc --color - env: - BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile diff --git a/better_errors.gemspec b/better_errors.gemspec index 04f74331..953f332e 100644 --- a/better_errors.gemspec +++ b/better_errors.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 2.0.0" - s.add_development_dependency "rake", "~> 10.0" + s.add_development_dependency "rake", ">= 10.0" s.add_development_dependency "rspec", "~> 3.5" s.add_development_dependency "rspec-html-matchers" s.add_development_dependency "rspec-its" diff --git a/gemfiles/rails61.gemfile b/gemfiles/rails61.gemfile index d185530c..6cb569ae 100644 --- a/gemfiles/rails61.gemfile +++ b/gemfiles/rails61.gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -gem "rails", "~> 6.1.0rc" +gem "rails", "~> 6.1.0" gem 'simplecov', require: false gem 'simplecov-lcov', require: false diff --git a/gemfiles/rails61_boc.gemfile b/gemfiles/rails61_boc.gemfile index 50442047..a90df3e8 100644 --- a/gemfiles/rails61_boc.gemfile +++ b/gemfiles/rails61_boc.gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -gem "rails", "~> 6.1.0rc" +gem "rails", "~> 6.1.0" gem "binding_of_caller" gem 'simplecov', require: false diff --git a/gemfiles/rails61_haml.gemfile b/gemfiles/rails61_haml.gemfile index 6685996f..16e70991 100644 --- a/gemfiles/rails61_haml.gemfile +++ b/gemfiles/rails61_haml.gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -gem "rails", "~> 6.1.0rc" +gem "rails", "~> 6.1.0" gem "haml" gem 'simplecov', require: false diff --git a/gemfiles/rails70.gemfile b/gemfiles/rails70.gemfile new file mode 100644 index 00000000..b942a581 --- /dev/null +++ b/gemfiles/rails70.gemfile @@ -0,0 +1,8 @@ +source "https://rubygems.org" + +gem "rails", "~> 7.0.0" + +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false + +gemspec path: "../" diff --git a/gemfiles/rails70_boc.gemfile b/gemfiles/rails70_boc.gemfile new file mode 100644 index 00000000..195c010f --- /dev/null +++ b/gemfiles/rails70_boc.gemfile @@ -0,0 +1,9 @@ +source "https://rubygems.org" + +gem "rails", "~> 7.0.0" +gem "binding_of_caller" + +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false + +gemspec path: "../" diff --git a/gemfiles/rails70_haml.gemfile b/gemfiles/rails70_haml.gemfile new file mode 100644 index 00000000..563e2bd1 --- /dev/null +++ b/gemfiles/rails70_haml.gemfile @@ -0,0 +1,9 @@ +source "https://rubygems.org" + +gem "rails", "~> 7.0.0" +gem "haml" + +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false + +gemspec path: "../"