-
Notifications
You must be signed in to change notification settings - Fork 0
214 lines (207 loc) · 8 KB
/
Copy pathci.yml
File metadata and controls
214 lines (207 loc) · 8 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
name: CI
on:
push:
pull_request:
env:
OPENSTATSPEC_SPECIFICATION_DIR: ${{ github.workspace }}/openstatspec-specification
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
name: PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v7
- name: Checkout OpenStatSpec specification fixtures
uses: actions/checkout@v7
with:
repository: OpenStatSpec/specification
ref: d287c2cde9ade71f04e27dd012caec876901aed5
path: openstatspec-specification
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- run: composer install --no-interaction --prefer-dist
- run: composer check
postgres-integration:
name: PostgreSQL ${{ matrix.postgres }} integration / PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
postgres: ['17.10', '18.4']
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_DB: openstatspec
POSTGRES_USER: openstatspec
POSTGRES_PASSWORD: openstatspec
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U openstatspec -d openstatspec"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
OPENSTATSPEC_PG_DSN: pgsql:host=127.0.0.1;port=5432;dbname=openstatspec
OPENSTATSPEC_PG_USER: openstatspec
OPENSTATSPEC_PG_PASSWORD: openstatspec
OPENSTATSPEC_EXPECTED_POSTGRES_VERSION: ${{ matrix.postgres }}
steps:
- uses: actions/checkout@v7
- name: Checkout OpenStatSpec specification fixtures
uses: actions/checkout@v7
with:
repository: OpenStatSpec/specification
ref: d287c2cde9ade71f04e27dd012caec876901aed5
path: openstatspec-specification
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_pgsql, pdo_sqlite, bcmath, mbstring, zlib
- run: composer install --no-interaction --prefer-dist
- run: vendor/bin/phpunit --filter "PostgreSqlSpssRoundTripTest|ServerVersionEvidenceTest|ServerCatalogMigrationTest|StrictSpssDictionaryConformanceTest|OfficialSpssConformanceManifestTest"
mysql-integration:
name: MySQL ${{ matrix.mysql }} integration / PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
mysql: ['8.4.11', '9.7.2']
services:
mysql:
image: mysql:${{ matrix.mysql }}
env:
MYSQL_DATABASE: openstatspec
MYSQL_USER: openstatspec
MYSQL_PASSWORD: openstatspec
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h 127.0.0.1 -uopenstatspec -popenstatspec"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
OPENSTATSPEC_MYSQL_DSN: mysql:host=127.0.0.1;port=3306;dbname=openstatspec;charset=utf8mb4
OPENSTATSPEC_MYSQL_USER: openstatspec
OPENSTATSPEC_MYSQL_PASSWORD: openstatspec
OPENSTATSPEC_EXPECTED_MYSQL_VERSION: ${{ matrix.mysql }}
steps:
- uses: actions/checkout@v7
- name: Checkout OpenStatSpec specification fixtures
uses: actions/checkout@v7
with:
repository: OpenStatSpec/specification
ref: d287c2cde9ade71f04e27dd012caec876901aed5
path: openstatspec-specification
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_mysql, pdo_sqlite, bcmath, mbstring, zlib
- run: composer install --no-interaction --prefer-dist
- run: vendor/bin/phpunit --filter "MySqlSpssRoundTripTest|ServerVersionEvidenceTest|ServerCatalogMigrationTest|StrictSpssDictionaryConformanceTest|OfficialSpssConformanceManifestTest"
mariadb-integration:
name: MariaDB ${{ matrix.mariadb }} integration / PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
mariadb: ['11.4.12', '11.8.8', '12.3.2']
services:
mariadb:
image: mariadb:${{ matrix.mariadb }}
env:
MARIADB_DATABASE: openstatspec
MARIADB_USER: openstatspec
MARIADB_PASSWORD: openstatspec
MARIADB_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
OPENSTATSPEC_MARIADB_DSN: mysql:host=127.0.0.1;port=3306;dbname=openstatspec;charset=utf8mb4
OPENSTATSPEC_MARIADB_USER: openstatspec
OPENSTATSPEC_MARIADB_PASSWORD: openstatspec
OPENSTATSPEC_EXPECTED_MARIADB_VERSION: ${{ matrix.mariadb }}
steps:
- uses: actions/checkout@v7
- name: Checkout OpenStatSpec specification fixtures
uses: actions/checkout@v7
with:
repository: OpenStatSpec/specification
ref: d287c2cde9ade71f04e27dd012caec876901aed5
path: openstatspec-specification
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_mysql, pdo_sqlite, bcmath, mbstring, zlib
- run: composer install --no-interaction --prefer-dist
- run: vendor/bin/phpunit --filter "MariaDbSpssRoundTripTest|ServerVersionEvidenceTest|ServerCatalogMigrationTest|StrictSpssDictionaryConformanceTest|OfficialSpssConformanceManifestTest"
dolt-integration:
name: Dolt ${{ matrix.dolt.version }} integration / PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
dolt:
- version: '2.2.2'
image: dolthub/dolt-sql-server:2.2.2@sha256:eb59cbb2bd5e1860f192a88f68c89697578256216ff848acf4bdc60ab5fc7ffc
- version: '2.2.3'
image: dolthub/dolt-sql-server:2.2.3@sha256:0243d2f3d1655a816d363885a7eb9e373f2aee9f96f8e289a0a0010f067314f3
services:
dolt:
image: ${{ matrix.dolt.image }}
env:
DOLT_DATABASE: openstatspec
DOLT_USER: openstatspec
DOLT_PASSWORD: openstatspec
DOLT_USER_HOST: "%"
DOLT_ROOT_PASSWORD: root
DOLT_ROOT_HOST: "%"
ports:
- 3306:3306
env:
OPENSTATSPEC_DOLT_DSN: mysql:host=127.0.0.1;port=3306;dbname=openstatspec;charset=utf8mb4
OPENSTATSPEC_DOLT_USER: openstatspec
OPENSTATSPEC_DOLT_PASSWORD: openstatspec
OPENSTATSPEC_EXPECTED_DOLT_VERSION: ${{ matrix.dolt.version }}
steps:
- uses: actions/checkout@v7
- name: Checkout OpenStatSpec specification fixtures
uses: actions/checkout@v7
with:
repository: OpenStatSpec/specification
ref: d287c2cde9ade71f04e27dd012caec876901aed5
path: openstatspec-specification
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_mysql, pdo_sqlite, bcmath, mbstring, zlib
- name: Wait for Dolt ${{ matrix.dolt.version }}
run: |
for attempt in {1..120}; do
php -r 'try { $pdo = new PDO(getenv("OPENSTATSPEC_DOLT_DSN"), getenv("OPENSTATSPEC_DOLT_USER"), getenv("OPENSTATSPEC_DOLT_PASSWORD")); exit($pdo->query("SELECT DOLT_VERSION()")->fetchColumn() === getenv("OPENSTATSPEC_EXPECTED_DOLT_VERSION") ? 0 : 1); } catch (Throwable) { exit(1); }' && exit 0
sleep 1
done
exit 1
- run: composer install --no-interaction --prefer-dist
- run: vendor/bin/phpunit --filter "DoltSpssRoundTripTest|ServerVersionEvidenceTest|ServerCatalogMigrationTest|StrictSpssDictionaryConformanceTest|OfficialSpssConformanceManifestTest"