-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (61 loc) · 1.54 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
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
ruby-version:
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
activerecord-version:
- '6_0'
- '6_1'
- '7_0'
- '7_1'
exclude:
# activerecord-7 doesn't support Ruby 2.6
- ruby-version: '2.6'
activerecord-version: '7_0'
- ruby-version: '2.6'
activerecord-version: '7_1'
services:
mysql:
image: mysql:5.7
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
env:
BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.activerecord-version }}.gemfile
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Build and test with Rake
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundle exec rake
env:
MYSQL_HOST: 127.0.0.1
MYSQL_USERNAME: root
MYSQL_PASSWORD: password
MYSQL_DATABASE: test