Skip to content

Commit

Permalink
Test against prev, current and next Sinatra release
Browse files Browse the repository at this point in the history
  • Loading branch information
dentarg committed Aug 9, 2024
1 parent 015b05d commit 92c4e6a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@ on:

jobs:
test:
name: Test with Ruby-${{ matrix.ruby }}
name: ${{ matrix.ruby }}, sinatra ${{ matrix.sinatra }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# 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, head, truffleruby]
ruby: [2.6, 2.7, '3.0', 3.1, 3.2, 3.3, truffleruby]
sinatra:
- ~> 4.0.0 # current stable
include:
- { ruby: jruby, allow-failure: true }
- { ruby: 2.6, sinatra: ~> 3.0.0 }
- { ruby: 3.3, sinatra: head }
- { ruby: head, sinatra: head }
- { ruby: jruby, sinatra: ~> 4.0.0, allow-failure: true }
env:
rack: ${{ matrix.sinatra }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
Expand Down
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ path '.' do
Support::Projects.each { |name| gem(name) }
gem 'support', group: :development
end

sinatra_version = ENV['sinatra'].to_s
sinatra_version = nil if sinatra_version.empty? || (sinatra_version == 'stable')
sinatra_version = { github: 'sinatra/sinatra' } if sinatra_version == 'head'
gem 'sinatra', sinatra_version
2 changes: 1 addition & 1 deletion support/support.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.add_dependency 'rspec'
s.add_dependency 'rspec-its'
s.add_dependency 'addressable'
s.add_dependency 'sinatra', '~> 1.4'
s.add_dependency 'sinatra'
s.add_dependency 'rack-test'
s.add_dependency 'rake'
s.add_dependency 'yard'
Expand Down

0 comments on commit 92c4e6a

Please sign in to comment.