rake bundle_all, release 2.21.1 #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] | |
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 |