-
Notifications
You must be signed in to change notification settings - Fork 14
80 lines (78 loc) · 2.14 KB
/
check.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
name: check
on:
push:
pull_request:
schedule:
- cron: 45 4 * * 4
jobs:
check:
runs-on: ubuntu-latest
container: "${{ matrix.container }}"
continue-on-error: ${{ startsWith(matrix.container, 'jruby:') }}
strategy:
matrix:
container:
- ruby:1.9
- ruby:2.0
- ruby:2.1
- ruby:2.2
- ruby:2.3
- ruby:2.4
- ruby:2.5
- ruby:2.6
- ruby:2.7
- ruby:3.0
- ruby:3.1
- ruby:3.2
- ruby:3.3
- jruby:9.3
- jruby:9.4
fail-fast: false
services:
mysql:
image: mysql:5.7
env:
MYSQL_USER: mysql
MYSQL_PASSWORD: mysql
MYSQL_DATABASE: dump_test
MYSQL_ROOT_PASSWORD: password
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3
postgres:
image: postgres:9.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dump_test
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- run: which git || (apt update && apt -y install git)
- run: git init
- if: ${{ matrix.container >= 'ruby:1.9' && matrix.container < 'ruby:2.3' }}
run: |
echo "gem: --no-ri --no-rdoc --no-document" > ~/.gemrc
gem install rubygems-update --version '< 3'
update_rubygems
gem install bundler --version '< 2'
- run: |
tee spec/db/database.yml << YAML
sqlite3:
adapter: sqlite3
database: ':memory:'
mysql:
adapter: mysql2
host: mysql
database: dump_test
username: mysql
password: mysql
encoding: utf8
postgresql:
adapter: postgresql
host: postgres
database: dump_test
username: postgres
password: postgres
YAML
- run: bundle install --jobs=3 --retry=3
- run: RUBYOPT=-rset bundle exec appraisal install --jobs=3 --retry=3
- run: bundle exec appraisal rspec