Skip to content

Commit

Permalink
Add rails versions to CI matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
padde committed Sep 15, 2024
1 parent bde8b9b commit 0b06a7c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ jobs:
fail-fast: false
matrix:
entry:
- { ruby: "3.2", grape-swagger: "HEAD" }
- { ruby: "ruby-head", grape-swagger: "HEAD" }
- { ruby: "jruby-head", grape-swagger: "HEAD" }
- { ruby: "3.2", rails: "edge", grape-swagger: "HEAD" }
- { ruby: "ruby-head", rails: "edge", grape-swagger: "HEAD" }
- { ruby: "jruby-head", rails: "edge", grape-swagger: "HEAD" }
env:
GRAPE_SWAGGER_VERSION: ${{ matrix.entry.grape-swagger }}
RAILS_VERSION: ${{ matrix.entry.rails }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
bundler-cache: true
- name: Print Bundler Versions
run: bundle show
- name: Setup Firefox
uses: browser-actions/setup-firefox@v1
with:
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,30 @@ jobs:
fail-fast: false
matrix:
entry:
- { ruby: "2.7", grape-swagger: "1.6.1" }
- { ruby: "3.0", grape-swagger: "1.6.1" }
- { ruby: "3.1", grape-swagger: "1.6.1" }
- { ruby: "3.2", grape-swagger: "1.6.1" }
- { ruby: "3.2", grape-swagger: "2.0.2" }
- { ruby: "jruby-9.4.6", grape-swagger: "1.6.1" }
- { ruby: "jruby-9.4.6", grape-swagger: "2.0.2" }
- { ruby: "2.7", rails: "6.1.7", grape-swagger: "1.6.1" }
- { ruby: "3.0", rails: "6.1.7", grape-swagger: "1.6.1" }
- { ruby: "3.1", rails: "6.1.7", grape-swagger: "1.6.1" }
- { ruby: "3.1", rails: "7.2.1", grape-swagger: "1.6.1" }
- { ruby: "3.2", rails: "6.1.7", grape-swagger: "1.6.1" }
- { ruby: "3.2", rails: "6.1.7", grape-swagger: "2.0.2" }
- { ruby: "3.2", rails: "7.2.1", grape-swagger: "1.6.1" }
- { ruby: "3.2", rails: "7.2.1", grape-swagger: "2.0.2" }
- { ruby: "jruby-9.4.6", rails: "6.1.7", grape-swagger: "1.6.1" }
- { ruby: "jruby-9.4.6", rails: "6.1.7", grape-swagger: "2.0.2" }
- { ruby: "jruby-9.4.6", rails: "7.2.1", grape-swagger: "1.6.1" }
- { ruby: "jruby-9.4.6", rails: "7.2.1", grape-swagger: "2.0.2" }
env:
GRAPE_SWAGGER_VERSION: ${{ matrix.entry.grape-swagger }}
RAILS_VERSION: ${{ matrix.entry.rails }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
bundler-cache: true
- name: Print Bundler Versions
run: bundle show
- name: Setup Firefox
uses: browser-actions/setup-firefox@v1
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 0.5.1 (Next)

* [#124](https://github.com/ruby-grape/grape-swagger-rails/pull/124): Rails 7 compatibility - [@padde](https://github.com/padde).
* [#125](https://github.com/ruby-grape/grape-swagger-rails/pull/125): Add rails versions to CI matrix - [@padde](https://github.com/padde).
* Your contribution here.

### 0.5.0 (2024/04/06)
Expand Down
11 changes: 9 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@ source 'https://rubygems.org'

gemspec

case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 1.6.0'
case grape_swagger_version = ENV.fetch('GRAPE_SWAGGER_VERSION', '~> 1.6.0')
when 'HEAD'
gem 'grape-swagger', github: 'ruby-grape/grape-swagger'
else
gem 'grape', '>= 1.3.0'
gem 'grape-swagger', version
gem 'grape-swagger', grape_swagger_version
end

case rails_version = ENV.fetch('RAILS_VERSION', '>= 6.0.6.1')
when 'edge'
gem 'railties', github: 'rails/rails', branch: 'main'
else
gem 'railties', rails_version
end

group :development, :test do
Expand Down

0 comments on commit 0b06a7c

Please sign in to comment.