forked from globalize/globalize
-
Notifications
You must be signed in to change notification settings - Fork 4
104 lines (100 loc) · 2.85 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
name: CI
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
matrix:
database: [ mysql, postgresql, sqlite3 ]
gemfile: [ '7.1.0', '7.0.1', '6.1.3.1', '6.0.3.6', '5.2.5', '5.1.7', '4.2.11.3' ]
ruby: [ '3.2', '3.1', '3.0', '2.7', '2.6', '2.5', '2.4' ]
exclude:
- ruby: '3.2'
gemfile: '6.1.3.1'
- ruby: '3.2'
gemfile: '6.0.3.6'
- ruby: '3.2'
gemfile: '5.2.5'
- ruby: '3.2'
gemfile: '5.1.7'
- ruby: '3.2'
gemfile: '4.2.11.3'
- ruby: '3.1'
gemfile: '6.0.3.6'
- ruby: '3.1'
gemfile: '5.2.5'
- ruby: '3.1'
gemfile: '5.1.7'
- ruby: '3.1'
gemfile: '4.2.11.3'
- ruby: '3.0'
gemfile: '5.2.5'
- ruby: '3.0'
gemfile: '5.1.7'
- ruby: '3.0'
gemfile: '4.2.11.3'
- ruby: '2.7'
gemfile: '5.2.5'
- ruby: '2.7'
gemfile: '5.1.7'
- ruby: '2.7'
gemfile: '4.2.11.3'
- ruby: '2.6'
gemfile: '7.1.0'
- ruby: '2.6'
gemfile: '7.0.1'
- ruby: '2.5'
gemfile: '7.1.0'
- ruby: '2.5'
gemfile: '7.0.1'
- ruby: '2.4'
gemfile: '7.1.0'
- ruby: '2.4'
gemfile: '7.0.1'
- ruby: '2.4'
gemfile: '6.1.3.1'
- ruby: '2.4'
gemfile: '6.0.3.6'
fail-fast: false
runs-on: ubuntu-latest
name: ${{ matrix.ruby }} ${{ matrix.database }} rails-${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update
- run: sudo apt-get install libpq-dev postgresql-client -y
if: matrix.database == 'postgresql'
- run: sudo apt-get install libsqlite3-dev -y
if: matrix.database == 'sqlite3'
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake db:create db:migrate
- run: bundle exec rake test
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile
BUNDLE_JOBS: 4
BUNDLE_PATH: vendor/bundle
CI: true
COVERALLS: true
DB: ${{ matrix.database }}
MYSQL_PASSWORD: root
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
RAILS_ENV: test
services:
postgres:
image: postgres:11.5
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:5.7
ports: ["3306:3306"]
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
env:
MYSQL_ROOT_PASSWORD: root