Update CI matrix and Gemfile for multi-version grape testing #71
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: RuboCop | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2 | |
bundler-cache: true | |
rubygems: latest | |
- name: Run RuboCop | |
run: bundle exec rubocop | |
test: | |
name: test (ruby=${{ matrix.ruby }}, grape=${{ matrix.grape }}, grape-swagger=${{ matrix.grape_swagger}}, grape_entity=${{ matrix.grape_entity }}) | |
strategy: | |
matrix: | |
grape: [ '~> 1.8.0', '~> 2.0.0', '~> 2.1.3', '~> 2.2.0', 'HEAD' ] | |
grape_swagger: [ '~> 2.0.3', '2.1.1', '~> 2.1.2', 'HEAD' ] | |
grape_entity: [ '~> 1.0.1', 'HEAD' ] | |
ruby: [ '3.0', '3.1', '3.2', '3.3', '3.4', 'head' ] | |
exclude: | |
# For ruby 3.0 only test grape 1.8.0 | |
- { ruby: '3.0', grape: '~> 2.0.0' } | |
- { ruby: '3.0', grape: '~> 2.1.3' } | |
- { ruby: '3.0', grape: '~> 2.2.0' } | |
- { ruby: '3.0', grape: 'HEAD' } | |
# For ruby 3.0 only test grape-swagger 2.0.3 | |
- { ruby: '3.0', grape_swagger: 'HEAD' } | |
- { ruby: '3.0', grape_swagger: '~> 2.1.2' } | |
# For grape 1.8.0 only test grape-swagger 2.0.3 | |
- { grape: '~> 1.8.0', grape_swagger: '~> 2.1.2' } | |
- { grape: '~> 1.8.0', grape_swagger: 'HEAD' } | |
runs-on: ubuntu-latest | |
env: | |
GRAPE_VERSION: ${{ matrix.grape }} | |
GRAPE_SWAGGER: ${{ matrix.grape_swagger }} | |
GRAPE_ENTITY: ${{ matrix.grape_entity }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rake spec |