Skip to content

Fix the CI status badge in readme #155

Fix the CI status badge in readme

Fix the CI status badge in readme #155

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.0', '3.1', '3.2']
rails: ['6.0', '6.1', '7.0', '7.1']
include:
- {ruby: '2.7', rails: '5.0'}
- {ruby: '2.7', rails: '5.1'}
- {ruby: '2.7', rails: '5.2'}
name: ruby${{ matrix.ruby }} rails${{ matrix.rails }} rake test
env:
BUNDLE_GEMFILE: gemfiles/rails${{ matrix.rails }}.gemfile
steps:
- uses: actions/checkout@v3
- 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@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: linter
run: bundle exec rake 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