diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 165095c1e..14ca00bfe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ permissions: jobs: rack-protection: - name: rack-protection (${{ matrix.ruby }}, Rack ${{ matrix.rack }}) + name: rack-protection (${{ matrix.ruby }}, rack ${{ matrix.rack }}, rack-session ${{ matrix.rack_session }}) runs-on: ubuntu-latest timeout-minutes: 5 strategy: @@ -19,6 +19,8 @@ jobs: matrix: rack: - stable + rack_session: + - stable ruby: - "2.6" - "2.7" @@ -29,6 +31,10 @@ jobs: - "jruby" - "truffleruby" - "ruby-head" + include: + # Rack + - { ruby: 3.2, rack: head, rack_session: stable } + - { ruby: 3.2, rack: stable, rack_session: head } env: rack: ${{ matrix.rack }} steps: @@ -57,7 +63,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} webhook: ${{ secrets.DISCORD_WEBHOOK }} - test: + sinatra: name: ${{ matrix.ruby }} (Rack ${{ matrix.rack }}, Puma ${{ matrix.puma }}, Tilt ${{ matrix.tilt }}) runs-on: ubuntu-latest timeout-minutes: 15 @@ -71,7 +77,7 @@ jobs: tilt: - stable # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' - ruby: [2.6, 2.7, '3.0', 3.1, 3.2, 3.3, truffleruby] + ruby: [2.6, 2.7, '3.0', 3.1, 3.2, 3.3, jruby, truffleruby] include: # Rack - { ruby: 3.2, rack: head, puma: stable, tilt: stable, allow-failure: true } @@ -79,10 +85,6 @@ jobs: - { ruby: 3.2, rack: stable, puma: head, tilt: stable, allow-failure: true } # Tilt - { ruby: 3.2, rack: stable, puma: stable, tilt: head, allow-failure: true } - # Due to flaky tests, see https://github.com/sinatra/sinatra/pull/1870 - - { ruby: jruby-9.3, rack: stable, puma: stable, tilt: stable, allow-failure: true } - # Due to https://github.com/jruby/jruby/issues/7647 - - { ruby: jruby-9.4, rack: stable, puma: stable, tilt: stable, allow-failure: true } # Never fail our build due to problems with head - { ruby: ruby-head, rack: stable, puma: stable, tilt: stable, allow-failure: true } - { ruby: jruby-head, rack: stable, puma: stable, tilt: stable, allow-failure: true } diff --git a/Gemfile b/Gemfile index 9b24134a2..6d56a2c8b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,5 @@ # frozen_string_literal: true -# Why use bundler? -# Well, not all development dependencies install on all rubies. Moreover, `gem -# install sinatra --development` doesn't work, as it will also try to install -# development dependencies of our dependencies, and those are not conflict free. -# So, here we are, `bundle install`. -# -# If you have issues with a gem: `bundle install --without-coffee-script`. - source 'https://rubygems.org' gemspec diff --git a/rack-protection/Gemfile b/rack-protection/Gemfile index 44bba020f..c5f4b42f8 100644 --- a/rack-protection/Gemfile +++ b/rack-protection/Gemfile @@ -1,16 +1,18 @@ # frozen_string_literal: true source 'https://rubygems.org' -# encoding: utf-8 +gemspec gem 'rake' gem 'rspec', '~> 3' +gem 'rack-test' rack_version = ENV['rack'].to_s rack_version = nil if rack_version.empty? || (rack_version == 'stable') rack_version = { github: 'rack/rack' } if rack_version == 'head' gem 'rack', rack_version -gemspec - -gem 'rack-test' +rack_session_version = ENV['rack_session'].to_s +rack_session_version = nil if rack_session_version.empty? || (rack_session_version == 'stable') +rack_session_version = { github: 'rack/rack-session' } if rack_session_version == 'head' +gem 'rack-session', rack_session_version