-
Notifications
You must be signed in to change notification settings - Fork 92
165 lines (145 loc) · 4.5 KB
/
main.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
name: build
on: [push, pull_request]
jobs:
build:
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
ports:
- 3306:3306
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10
strategy:
fail-fast: false
matrix:
db: [sqlite3, postgresql, mysql]
ruby_version: [ruby-head, '3.3', '3.2', '3.1']
rails_version: [edge, '7.1', '7.0', '6.1']
exclude:
- ruby_version: ruby-head
rails_version: '6.1'
include:
- ruby_version: '3.0'
rails_version: '7.1'
db: sqlite3
- ruby_version: '3.0'
rails_version: '7.1'
db: postgresql
- ruby_version: '3.0'
rails_version: '7.1'
db: mysql
- ruby_version: '2.7'
rails_version: '7.1'
db: sqlite3
- ruby_version: '2.7'
rails_version: '7.1'
db: postgresql
- ruby_version: '2.7'
rails_version: '7.1'
db: mysql
- ruby_version: '2.7'
rails_version: '7.0'
db: sqlite3
- ruby_version: '2.7'
rails_version: '7.0'
db: postgresql
- ruby_version: '2.7'
rails_version: '7.0'
db: mysql
- ruby_version: '3.0'
rails_version: '6.1'
db: sqlite3
- ruby_version: '3.0'
rails_version: '6.1'
db: postgresql
- ruby_version: '3.0'
rails_version: '6.1'
db: mysql
- ruby_version: '2.6'
rails_version: '6.1'
db: sqlite3
- ruby_version: '2.6'
rails_version: '6.1'
db: postgresql
- ruby_version: '2.6'
rails_version: '6.1'
db: mysql
- ruby_version: '2.7'
rails_version: '6.0'
db: sqlite3
- ruby_version: '2.7'
rails_version: '6.0'
db: postgresql
- ruby_version: '2.7'
rails_version: '6.0'
db: mysql
- ruby_version: '2.7'
rails_version: '5.2'
db: sqlite3
- ruby_version: '2.7'
rails_version: '5.2'
db: postgresql
- ruby_version: '2.7'
rails_version: '5.2'
db: mysql
- ruby_version: '2.4'
rails_version: '5.2'
db: sqlite3
- ruby_version: '2.4'
rails_version: '5.2'
db: postgresql
- ruby_version: '2.4'
rails_version: '5.2'
db: mysql
- ruby_version: '2.6'
rails_version: '5.1'
db: sqlite3
- ruby_version: '2.6'
rails_version: '5.1'
db: postgresql
- ruby_version: '2.6'
rails_version: '5.1'
db: mysql
- ruby_version: '2.5'
rails_version: '5.0'
db: sqlite3
- ruby_version: '2.5'
rails_version: '5.0'
db: postgresql
- ruby_version: '2.5'
rails_version: '5.0'
db: mysql
- ruby_version: '2.4'
rails_version: '4.2'
db: sqlite3
- ruby_version: '2.4'
rails_version: '4.2'
db: postgresql
- ruby_version: '2.4'
rails_version: '4.2'
db: mysql
runs-on: ubuntu-20.04
env:
RAILS_VERSION: ${{ matrix.rails_version }}
DB: ${{ matrix.db }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
rubygems: ${{ matrix.ruby_version < '2.6' && 'default' || 'latest' }}
bundler: ${{ startsWith(matrix.rails_version, '4.') && '1' || 'latest' }}
bundler-cache: true
continue-on-error: ${{ (matrix.ruby_version == 'ruby-head') || (matrix.allow_failures == 'true') }}
- run: bundle exec rake
continue-on-error: ${{ (matrix.ruby_version == 'ruby-head') || (matrix.rails_version == 'edge') || (matrix.allow_failures == 'true') }}