-
-
Notifications
You must be signed in to change notification settings - Fork 327
64 lines (62 loc) · 2.47 KB
/
test.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
54
55
56
57
58
59
60
61
62
63
64
---
name: build
on:
push:
branches:
- main
- renovate/**
pull_request:
branches:
- main
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
gemfile: ['rails_5_2', 'rails_6_0', 'rails_6_1', 'rails_7_0', 'rails_7_1']
exclude:
# Latest ruby will test
# - all rails versions in current major
# - latest rails version in the previous major
# Supported rubies will test
# - all permissible supported rails versions
# Unsupported rubies will test
# - rails versions in each branch if they are released within 6 months of EOL
# - nothing in the current rails major
# 2.6 -> Unsupported from March '22 -> Only test up to Sep '22
# 2.7 -> Unsupported from March '23 -> Only test up to Sep '23
# 3.0/3.1/3.2 -> Supported
- { ruby: '2.6', gemfile: 'rails_6_0' }
- { ruby: '2.6', gemfile: 'rails_6_1' }
- { ruby: '2.6', gemfile: 'rails_7_0' }
- { ruby: '2.6', gemfile: 'rails_7_1' }
- { ruby: '2.7', gemfile: 'rails_7_0' }
- { ruby: '2.7', gemfile: 'rails_7_1' }
# Ruby 3+ won't work with Rails 5.2: https://github.com/rails/rails/issues/40938
- { ruby: '3.0', gemfile: 'rails_5_2' }
# Capybara has an incompatibility here with rails 6. It's easier to just exclude this one run from the matrix until it's out of support
- { ruby: '3.0', gemfile: 'rails_6_0' }
- { ruby: '3.0', gemfile: 'rails_6_1' }
- { ruby: '3.1', gemfile: 'rails_5_2' }
# Ruby 3.1+ has a conflicting Psych version with Rails 6.x: https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias
- { ruby: '3.1', gemfile: 'rails_6_0' }
- { ruby: '3.1', gemfile: 'rails_6_1' }
- { ruby: '3.2', gemfile: 'rails_5_2' }
- { ruby: '3.2', gemfile: 'rails_6_0' }
- { ruby: '3.2', gemfile: 'rails_6_1' }
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: '2.4.19'
rubygems: latest
bundler-cache: true
- run: bundle exec rake spec
- run: bundle exec rubocop
- run: bundle exec rake cucumber