-
Notifications
You must be signed in to change notification settings - Fork 1.1k
156 lines (152 loc) · 5 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
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
name: Test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby:
- 2.5
- 2.6
- 2.7
- '3.0'
- 3.1
- 3.2
gemfile:
- gemfiles/rails_4_2.gemfile
- gemfiles/rails_5_0.gemfile
- gemfiles/rails_5_1.gemfile
- gemfiles/rails_5_2.gemfile
- gemfiles/rails_6_0.gemfile
- gemfiles/rails_7_0.gemfile
db:
- sqlite
- mysql
- postgresql
devise-token-auth-orm:
- active_record
include:
- ruby: 2.5
gemfile: gemfiles/rails_5_2_mongoid_6.gemfile
devise-token-auth-orm: mongoid
- ruby: 2.5
gemfile: gemfiles/rails_5_2_mongoid_7.gemfile
devise-token-auth-orm: mongoid
- ruby: 2.6
gemfile: gemfiles/rails_5_2_mongoid_7.gemfile
devise-token-auth-orm: mongoid
- ruby: 2.7
gemfile: gemfiles/rails_6_0_mongoid_7.gemfile
devise-token-auth-orm: mongoid
- ruby: 2.7
gemfile: gemfiles/rails_7_0_mongoid_7.gemfile
devise-token-auth-orm: mongoid
- ruby: 2.7
gemfile: gemfiles/rails_7_0.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_7_0.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_7_0_mongoid_7.gemfile
devise-token-auth-orm: mongoid
- ruby: 3.1
gemfile: gemfiles/rails_7_0.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_7_0_mongoid_7.gemfile
devise-token-auth-orm: mongoid
- ruby: 3.2
gemfile: gemfiles/rails_7_0.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_7_0_mongoid_7.gemfile
devise-token-auth-orm: mongoid
exclude:
- ruby: 2.5
gemfile: gemfiles/rails_7_0.gemfile
- ruby: 2.6
gemfile: gemfiles/rails_4_2.gemfile
- ruby: 2.6
gemfile: gemfiles/rails_7_0.gemfile
- ruby: 2.7
gemfile: gemfiles/rails_4_2.gemfile
- ruby: 2.7
gemfile: gemfiles/rails_5_0.gemfile
- ruby: 2.7
gemfile: gemfiles/rails_5_1.gemfile
- ruby: 2.7
gemfile: gemfiles/rails_5_2.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_4_2.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_5_0.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_5_1.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_5_2.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_6_0.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_4_2.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_5_0.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_5_1.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_5_2.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_6_0.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_4_2.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_5_0.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_5_1.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_5_2.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_6_0.gemfile
services:
mysql:
image: mysql:8
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgresql:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- name: Setup Bundler 1.x for Rails 4.x
if: ${{ matrix.gemfile == 'gemfiles/rails_4_2.gemfile' || matrix.gemfile == 'gemfiles/rails_4_2_mongoid_5.gemfile' }}
run: echo "BUNDLER_VERSION=1.17.3" >> $GITHUB_ENV
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
bundler: ${{ env.BUNDLER_VERSION || 'latest' }}
- uses: supercharge/mongodb-github-action@1.3.0
if: ${{ matrix.devise-token-auth-orm == 'mongoid' }}
- name: Setup Database
run: |
bundle exec rake db:create
bundle exec rake --trace db:migrate
env:
RAILS_ENV: test
DB: ${{ matrix.db }}
DEVISE_TOKEN_AUTH_ORM: ${{ matrix.devise-token-auth-orm }}
if: ${{ matrix.devise-token-auth-orm == 'active_record' }}
- run: bundle exec rake
env:
RAILS_ENV: test
DB: ${{ matrix.db }}
DEVISE_TOKEN_AUTH_ORM: ${{ matrix.devise-token-auth-orm }}