Skip to content

add Rails 8.1 tests #225

add Rails 8.1 tests

add Rails 8.1 tests #225

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2', '3.3', '3.4']
rails: ['6.1', '7.0', '7.1', '7.2', '8.0', '8.1']
include:
- {ruby: '3.4', rails: '_main'}
- {ruby: '3.1', rails: '6.1'}
- {ruby: '3.1', rails: '7.0'}
- {ruby: '3.1', rails: '7.1'}
name: ruby${{ matrix.ruby }} rails${{ matrix.rails }} rake test
env:
BUNDLE_GEMFILE: gemfiles/rails${{ matrix.rails }}.gemfile
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake test
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: linter
run: bundle exec rubocop
# This wrapper is used in the main branch protection rules as a required check.
# This way, we don’t need to update those rules when we add or remove a version in the test matrix.
tests_successful:
name: Tests passing?
needs: tests
if: always()
runs-on: ubuntu-latest
steps:
- run: |
if ${{ needs.tests.result == 'success' }}
then
echo "All tests pass"
else
echo "Some tests failed"
false
fi