1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
name: Ruby
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
strategy:
fail-fast: false
matrix:
rubyopt: [""]
ruby_version: [head, 3.4, 3.3, 3.2, jruby]
gemfile:
- Gemfile
- gemfiles/Gemfile.rails-7.0.x
- gemfiles/Gemfile.rails-7.1.x
- gemfiles/Gemfile.rails-7.2.x
- gemfiles/Gemfile.rails-8.0.x
- gemfiles/Gemfile.rails-main
exclude:
# JRuby is not supported by Rails 7.0.x
- ruby_version: jruby
gemfile: gemfiles/Gemfile.rails-7.0.x
# JRuby is not supported by Rails 8+
- ruby_version: jruby
gemfile: gemfiles/Gemfile.rails-8.0.x
- ruby_version: jruby
gemfile: gemfiles/Gemfile.rails-main
include:
- ruby_version: 3.4
gemfile: Gemfile
rubyopt: "--enable-frozen-string-literal --debug-frozen-string-literal"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true # 'bundle install' and cache
- name: Build and test with Rake
run: bundle exec rake
|