Skip to content

Support Rails 8.1, Ruby 4.0 #304

Support Rails 8.1, Ruby 4.0

Support Rails 8.1, Ruby 4.0 #304

Workflow file for this run

name: Test
on: [push]
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby-version:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
- '4.0'
gemfile:
- gemfiles/Gemfile.rails70
- gemfiles/Gemfile.rails71
- gemfiles/Gemfile.rails72
- gemfiles/Gemfile.rails80
- gemfiles/Gemfile.rails81
exclude:
# rails 8.0 requires ruby >= 3.2
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.1'
gemfile: 'gemfiles/Gemfile.rails80'
# rails 7.0 requires ruby <= 3.3
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.4'
gemfile: 'gemfiles/Gemfile.rails70'
- ruby-version: '4.0'
gemfile: 'gemfiles/Gemfile.rails70'
name: Ruby ${{ matrix.ruby-version }} / Bundle ${{ matrix.gemfile }}
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
# A utility job upon which Branch Protection can depend,
# thus remaining agnostic of the matrix.
test_matrix:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Matrix
needs: test
steps:
- name: Check build matrix status
if: ${{ needs.test.result != 'success' }}
run: exit 1
# notify:
# # Run only on master, but regardless of whether tests past:
# if: ${{ always() && github.ref == 'refs/heads/master' }}
#
# needs: test_matrix
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: 8398a7/action-slack@v3
# with:
# status: custom
# fields: workflow,commit,author
# custom_payload: |
# {
# channel: 'C7FQWGDHP',
# username: 'CI – ' + '${{ github.repository }}'.split('/')[1],
# icon_emoji: ':hammer_and_wrench:',
# attachments: [{
# color: '${{ needs.test_matrix.result }}' === 'success' ? 'good' : '${{ needs.test_matrix.result }}' === 'failure' ? 'danger' : 'warning',
# text: `${process.env.AS_WORKFLOW} against \`${{ github.ref }}\` (${process.env.AS_COMMIT}) for ${{ github.actor }} resulted in *${{ needs.test_matrix.result }}*.`
# }]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}