-
Notifications
You must be signed in to change notification settings - Fork 33
53 lines (51 loc) · 1.35 KB
/
actions.yml
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: 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', '3.3']
rails: ['6.0', '6.1', '7.0', '7.1']
include:
- {ruby: '3.3', rails: '_main'}
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