Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: test rack-session head, test only latest JRuby #1986

Merged
merged 5 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ 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:
fail-fast: false
matrix:
rack:
- stable
rack_session:
- stable
ruby:
- "2.6"
- "2.7"
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -71,18 +77,14 @@ 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 }
# Puma
- { 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 }
Expand Down
8 changes: 0 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 6 additions & 4 deletions rack-protection/Gemfile
Original file line number Diff line number Diff line change
@@ -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