Skip to content

Support fallback parsers for vendor-specific media types #94

Support fallback parsers for vendor-specific media types

Support fallback parsers for vendor-specific media types #94

Workflow file for this run

name: Ruby
on:
push:
branches:
- main
pull_request:
env:
CI: 1
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
jobs:
lint:
runs-on: ubuntu-latest
name: Linter
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Run StandardRB
run: bundle exec standardrb
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
ruby:
- "3.3"
- "3.2"
- "3.1"
- "3.0"
- "2.7"
include:
- ruby: "jruby"
continue-on-error: true
- ruby: "truffleruby"
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install dependencies for JRuby
if: matrix.ruby == 'jruby'
run: sudo apt-get update && sudo apt-get install -y build-essential libssl-dev
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
vendor/bundle
examples/vendor/bundle
examples/rails_app/vendor/bundle
key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-${{ matrix.ruby }}-
- name: Run Core Tests
run: |
bundle config path vendor/bundle
bundle install
bundle exec rspec
- name: Run RSpec Example
run: |
bundle install --gemfile ./examples/Gemfile-rspec
bundle exec --gemfile ./examples/Gemfile-rspec ruby examples/rspec.rb
- name: Run Minitest Example
run: |
bundle install --gemfile ./examples/Gemfile-minitest
bundle exec --gemfile ./examples/Gemfile-minitest ruby examples/minitest.rb
- name: Run Rails Example
working-directory: ./examples/rails_app
run: |
bundle install
bundle exec rspec