-
-
Notifications
You must be signed in to change notification settings - Fork 194
167 lines (147 loc) · 4.16 KB
/
ci.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
# Do not bother building commits with [ci skip] or [skip ci] in the commit message
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
gemfile:
- rails_4_2
- rails_5_0
- rails_5_1
- rails_5_2
- rails_6_0
- rails_6_1
- rails_7_0
- rails_7_1
rubygems:
- default
bundler:
- default
ruby:
- "2.3"
- "2.4"
- "2.5"
- "2.6"
- jruby
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
exclude:
# Rails 7.1 requires Ruby 2.7 and above
- gemfile: rails_7_1
ruby: "2.3"
- gemfile: rails_7_1
ruby: "2.4"
- gemfile: rails_7_1
ruby: "2.5"
- gemfile: rails_7_1
ruby: "2.6"
# Rails 7.0 requires Ruby 2.7 and above
- gemfile: rails_7_0
ruby: "2.3"
- gemfile: rails_7_0
ruby: "2.4"
- gemfile: rails_7_0
ruby: "2.5"
- gemfile: rails_7_0
ruby: "2.6"
# Rails 6.1 requires Ruby 2.5 and above.
- gemfile: rails_6_1
ruby: "2.3"
- gemfile: rails_6_1
ruby: "2.4"
# Rails 6.0 requires Ruby 2.5 and above.
- gemfile: rails_6_0
ruby: "2.3"
- gemfile: rails_6_0
ruby: "2.4"
# Rails supports Ruby 3.0 since 6.0 only. So skip all the other Rails versions.
- ruby: "3.0"
gemfile: rails_4_2
- ruby: "3.0"
gemfile: rails_5_0
- ruby: "3.0"
gemfile: rails_5_1
- ruby: "3.0"
gemfile: rails_5_2
- ruby: "3.1"
gemfile: rails_4_2
- ruby: "3.1"
gemfile: rails_5_0
- ruby: "3.1"
gemfile: rails_5_1
- ruby: "3.1"
gemfile: rails_5_2
- ruby: "3.2"
gemfile: rails_4_2
- ruby: "3.2"
gemfile: rails_5_0
- ruby: "3.2"
gemfile: rails_5_1
- ruby: "3.2"
gemfile: rails_5_2
- ruby: "3.3"
gemfile: rails_4_2
- ruby: "3.3"
gemfile: rails_5_0
- ruby: "3.3"
gemfile: rails_5_1
- ruby: "3.3"
gemfile: rails_5_2
- ruby: "jruby"
gemfile: rails_4_2
- ruby: "jruby"
gemfile: rails_5_0
- ruby: "jruby"
gemfile: rails_5_1
- ruby: "jruby"
gemfile: rails_5_2
include:
- ruby: "jruby-9.3.9.0"
gemfile: rails_4_2
- ruby: "jruby-9.3.9.0"
gemfile: rails_5_0
- ruby: "jruby-9.3.9.0"
gemfile: rails_5_1
- ruby: "jruby-9.3.9.0"
gemfile: rails_5_2
name: ${{ matrix.gemfile }}, Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v3
- name: Setup Ruby & Bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: true
- name: Start dynamodb-local
run: |
docker compose up -d
- name: Run RSpec tests
run: |
bundle exec rspec
- name: Stop dynamodb-local
run: |
docker compose down