141 lines (141 loc) · 4.65 KB
/
ruby_event_store-active_record_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
name: ruby_event_store-active_record_test
on:
workflow_dispatch:
repository_dispatch:
types:
- script
push:
paths:
- aggregate_root/**
- rails_event_store/**
- ruby_event_store/**
- ruby_event_store-active_record/**
- ruby_event_store-browser/**
- ruby_event_store-rspec/**
- ".github/workflows/ruby_event_store-active_record_test.yml"
- support/**
- "!support/bundler/**"
- "!support/ci/**"
pull_request:
types:
- opened
- reopened
paths:
- aggregate_root/**
- rails_event_store/**
- ruby_event_store/**
- ruby_event_store-active_record/**
- ruby_event_store-browser/**
- ruby_event_store-rspec/**
- ".github/workflows/ruby_event_store-active_record_test.yml"
- support/**
- "!support/bundler/**"
- "!support/ci/**"
jobs:
test:
runs-on: ubuntu-20.04
timeout-minutes: 120
env:
WORKING_DIRECTORY: ruby_event_store-active_record
RUBY_VERSION: "${{ matrix.ruby_version }}"
BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}"
DATABASE_URL: "${{ matrix.database_url }}"
DATA_TYPE: "${{ matrix.data_type }}"
services:
postgres_11:
image: postgres:11
env:
POSTGRES_DB: rails_event_store
POSTGRES_PASSWORD: secret
ports:
- 10011:5432
options: --health-cmd "pg_isready" --health-interval 10s --health-timeout 5s --health-retries 5
postgres_15:
image: postgres:15
env:
POSTGRES_DB: rails_event_store
POSTGRES_PASSWORD: secret
ports:
- 10015:5432
options: --health-cmd "pg_isready" --health-interval 10s --health-timeout 5s --health-retries 5
mysql_5:
image: mysql:5
env:
MYSQL_DATABASE: rails_event_store
MYSQL_ROOT_PASSWORD: secret
ports:
- 10005:3306
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
mysql_8:
image: mysql:8
env:
MYSQL_DATABASE: rails_event_store
MYSQL_ROOT_PASSWORD: secret
ports:
- 10008:3306
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
fail-fast: false
matrix:
include:
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: sqlite3:db.sqlite3
data_type: binary
- ruby_version: ruby-3.2
bundle_gemfile: Gemfile
database_url: sqlite3:db.sqlite3
data_type: binary
- ruby_version: ruby-3.1
bundle_gemfile: Gemfile
database_url: sqlite3:db.sqlite3
data_type: binary
- ruby_version: ruby-3.0
bundle_gemfile: Gemfile
database_url: sqlite3:db.sqlite3
data_type: binary
- ruby_version: truffleruby
bundle_gemfile: Gemfile
database_url: sqlite3:db.sqlite3
data_type: binary
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: postgres://postgres:secret@localhost:10015/rails_event_store?pool=5
data_type: binary
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: postgres://postgres:secret@localhost:10011/rails_event_store?pool=5
data_type: binary
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: postgres://postgres:secret@localhost:10015/rails_event_store?pool=5
data_type: json
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: postgres://postgres:secret@localhost:10015/rails_event_store?pool=5
data_type: jsonb
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: mysql2://root:secret@127.0.0.1:10008/rails_event_store?pool=5
data_type: binary
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: mysql2://root:secret@127.0.0.1:10005/rails_event_store?pool=5
data_type: binary
- ruby_version: ruby-3.3
bundle_gemfile: Gemfile
database_url: mysql2://root:secret@127.0.0.1:10008/rails_event_store?pool=5
data_type: json
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- run: test -e ${{ env.BUNDLE_GEMFILE }}.lock
working-directory: "${{ env.WORKING_DIRECTORY }}"
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ env.RUBY_VERSION }}"
bundler-cache: true
working-directory: "${{ env.WORKING_DIRECTORY }}"
- run: make test
working-directory: "${{ env.WORKING_DIRECTORY }}"