-
Notifications
You must be signed in to change notification settings - Fork 32
56 lines (54 loc) · 1.47 KB
/
actions.yml
File metadata and controls
56 lines (54 loc) · 1.47 KB
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
54
55
56
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