-
Notifications
You must be signed in to change notification settings - Fork 13
100 lines (89 loc) · 2.1 KB
/
test.yml
File metadata and controls
100 lines (89 loc) · 2.1 KB
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
---
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test_mysql:
runs-on: ubuntu-24.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.5.3
gemfile: Gemfile.5.0
- ruby: 2.5.3
gemfile: Gemfile.5.1
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup databases
run: |
mysql -e 'create database IF NOT EXISTS assignable_values_test;' -u root --password=password -P 3306 -h 127.0.0.1
- name: Run tests
run: bundle exec rspec
test_pg:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: assignable_values_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.5.3
gemfile: Gemfile.5.1.pg
- ruby: 2.5.3
gemfile: Gemfile.6.1.pg
- ruby: 2.7.3
gemfile: Gemfile.6.1.pg
- ruby: 2.7.3
gemfile: Gemfile.7.1.pg
- ruby: 3.3.0
gemfile: Gemfile.6.1.pg
- ruby: 3.3.0
gemfile: Gemfile.7.1.pg
- ruby: 3.3.6
gemfile: Gemfile.8.0.pg
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Run tests
run: bundle exec rspec