Skip to content

Commit f83f6fc

Browse files
authored
Split test suite into independent jobs (#1287)
* Split test-suite into standalone steps * Restored unit testsuite for infection * Added missing env variables * Fixed Azure URL Factory Tests * Locked meilisearch version to 1.11.0 * Reduced extension tests to parquet only * Lock meilisearch 1.11 on github actions
1 parent 30668e6 commit f83f6fc

File tree

13 files changed

+446
-144
lines changed

13 files changed

+446
-144
lines changed

.github/workflows/test-extensions.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ jobs:
3131
matrix:
3232
dependencies:
3333
- "locked"
34-
- "lowest"
35-
- "highest"
3634
php-version:
3735
- "8.1"
3836
- "8.2"
@@ -91,13 +89,13 @@ jobs:
9189
run: "composer install --no-interaction --no-progress --no-suggest"
9290

9391
- name: "Test Brotli"
94-
run: "composer test -- --group brotli-extension"
92+
run: "composer test:lib:parquet -- --group brotli-extension"
9593

9694
- name: "Test LZ4"
97-
run: "composer test -- --group lz4-extension"
95+
run: "composer test:lib:parquet -- --group lz4-extension"
9896

9997
- name: "Test ZSTD"
100-
run: "composer test -- --group zstd-extension"
98+
run: "composer test:lib:parquet -- --group zstd-extension"
10199

102100
- name: "Test Snappy"
103-
run: "composer test -- --group snappy-extension"
101+
run: "composer test:lib:parquet -- --group snappy-extension"

.github/workflows/test-suite.yml

Lines changed: 83 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
ports:
4040
- 9200:9200
4141
meilisearch:
42-
image: getmeili/meilisearch:latest
42+
image: getmeili/meilisearch:v1.11
4343
env:
4444
MEILI_MASTER_KEY: masterKey
4545
MEILI_NO_ANALYTICS: true
@@ -142,12 +142,89 @@ jobs:
142142
if: ${{ matrix.dependencies == 'locked' }}
143143
run: "composer install --no-interaction --no-progress --no-suggest"
144144

145-
- name: "Test"
146-
run: "composer test"
145+
- name: "Test - ETL "
146+
run: "composer test:etl"
147+
148+
- name: "Test - CLI"
149+
run: "composer test:cli"
150+
151+
- name: "Test - Lib - Array Dot"
152+
run: "composer test:lib:array-dot"
153+
154+
- name: "Test - Lib - Azure SDK"
155+
run: "composer test:lib:azure-sdk"
156+
157+
- name: "Test - Lib - Doctrine DBAL Bulk"
158+
run: "composer test:lib:doctrine-dbal-bulk"
147159
env:
148160
PGSQL_DATABASE_URL: pgsql://postgres:[email protected]:${{ job.services.postgres.ports[5432] }}/postgres?serverVersion=11&charset=utf8
149161
MYSQL_DATABASE_URL: mysql://mysql:[email protected]:${{ job.services.mysql.ports[3306] }}/mysql
150-
FLOW_LOCAL_FILESYSTEM_CACHE_DIR: "./var/cache/${{ matrix.php-version }}-${{ matrix.dependencies }}"
151162

152-
- name: "Run Examples"
153-
run: "php examples/run.php"
163+
- name: "Test - Lib - Filesystem"
164+
run: "composer test:lib:filesystem"
165+
166+
- name: "Test - Lib - parquet"
167+
run: "composer test:lib:parquet"
168+
env:
169+
FLOW_PARQUET_TESTS_DEBUG: "0"
170+
171+
- name: "Test - Lib - Parquet Viewer"
172+
run: "composer test:lib:parquet-viewer"
173+
174+
- name: "Test - Lib - RDSL"
175+
run: "composer test:lib:rdsl"
176+
177+
- name: "Test - Lib - Snappy"
178+
run: "composer test:lib:snappy"
179+
180+
- name: "Test - Bridge - Filesystem Azure"
181+
run: "composer test:bridge:filesystem-azure"
182+
183+
- name: "Test - Bridge - Monolog Http"
184+
run: "composer test:bridge:monolog-http"
185+
186+
- name: "Test - Bridge - Symfony Http Foundation"
187+
run: "composer test:bridge:symfony-http-foundation"
188+
189+
- name: "Test - Adapter - ChartJs"
190+
run: "composer test:adapter:chartjs"
191+
192+
- name: "Test - Adapter - CSV"
193+
run: "composer test:adapter:csv"
194+
195+
- name: "Test - Adapter - Doctrine"
196+
run: "composer test:adapter:doctrine"
197+
env:
198+
PGSQL_DATABASE_URL: "pgsql://postgres:[email protected]:${{ job.services.postgres.ports[5432] }}/postgres?serverVersion=11&charset=utf8"
199+
MYSQL_DATABASE_URL: "mysql://mysql:[email protected]:${{ job.services.mysql.ports[3306] }}/mysql"
200+
SQLITE_DATABASE_URL: "sqlite:///:memory:"
201+
202+
- name: "Test - Adapter - Elasticsearch"
203+
run: "composer test:adapter:elasticsearch"
204+
205+
- name: "Test - Adapter - Google Sheet"
206+
run: "composer test:adapter:google-sheet"
207+
208+
- name: "Test - Adapter - Http"
209+
run: "composer test:adapter:http"
210+
211+
- name: "Test - Adapter - Json"
212+
run: "composer test:adapter:json"
213+
214+
- name: "Test - Adapter - Logger"
215+
run: "composer test:adapter:logger"
216+
217+
- name: "Test - Adapter - Meilisearch"
218+
run: "composer test:adapter:meilisearch"
219+
220+
- name: "Test - Adapter - Parquet"
221+
run: "composer test:adapter:parquet"
222+
223+
- name: "Test - Adapter - Text"
224+
run: "composer test:adapter:text"
225+
226+
- name: "Test - Adapter - XML"
227+
run: "composer test:adapter:xml"
228+
229+
- name: "Test - Examples"
230+
run: "composer test:examples"

composer.json

Lines changed: 117 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"google/apiclient": "^2.13",
2828
"halaxa/json-machine": "^1.1",
2929
"jawira/case-converter": "^3.4",
30-
"meilisearch/meilisearch-php": "^1.1",
30+
"meilisearch/meilisearch-php": "~1.11.0",
3131
"monolog/monolog": "^2.0||^3.0",
3232
"packaged/thrift": "^0.15.0",
3333
"php-http/discovery": "^1.0",
@@ -212,8 +212,123 @@
212212
"@test:mutation"
213213
],
214214
"test": [
215-
"tools/phpunit/vendor/bin/phpunit"
215+
"@test:etl",
216+
"@test:cli",
217+
"@test:lib:array-dot",
218+
"@test:lib:azure-sdk",
219+
"@test:lib:doctrine-dbal-bulk",
220+
"@test:lib:filesystem",
221+
"@test:lib:parquet",
222+
"@test:lib:parquet-viewer",
223+
"@test:lib:rdsl",
224+
"@test:lib:snappy",
225+
"@test:bridge:filesystem-azure",
226+
"@test:bridge:monolog-http",
227+
"@test:bridge:symfony-http-foundation",
228+
"@test:adapter:chartjs",
229+
"@test:adapter:csv",
230+
"@test:adapter:doctrine",
231+
"@test:adapter:elasticsearch",
232+
"@test:adapter:google-sheet",
233+
"@test:adapter:http",
234+
"@test:adapter:json",
235+
"@test:adapter:logger",
236+
"@test:adapter:meilisearch",
237+
"@test:adapter:parquet",
238+
"@test:adapter:text",
239+
"@test:adapter:xml"
216240
],
241+
"test:etl": [
242+
"tools/phpunit/vendor/bin/phpunit --testsuite=etl-unit",
243+
"tools/phpunit/vendor/bin/phpunit --testsuite=etl-integration"
244+
],
245+
"test:cli": [
246+
"tools/phpunit/vendor/bin/phpunit --testsuite=cli-unit",
247+
"tools/phpunit/vendor/bin/phpunit --testsuite=cli-integration"
248+
],
249+
"test:lib:array-dot": [
250+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-array-dot-unit"
251+
],
252+
"test:lib:azure-sdk": [
253+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-azure-sdk-unit"
254+
],
255+
"test:lib:doctrine-dbal-bulk": [
256+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-doctrine-dbal-bulk-unit",
257+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-doctrine-dbal-bulk-integration"
258+
],
259+
"test:lib:filesystem": [
260+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-filesystem-unit",
261+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-filesystem-integration"
262+
],
263+
"test:lib:parquet": [
264+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-parquet-unit",
265+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-parquet-integration"
266+
],
267+
"test:lib:parquet-viewer": [
268+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-parquet-integration"
269+
],
270+
"test:lib:rdsl": [
271+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-rdsl-unit",
272+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-rdsl-integration"
273+
],
274+
"test:lib:snappy": [
275+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-snappy-integration"
276+
],
277+
"test:bridge:filesystem-azure": [
278+
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-azure-unit",
279+
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-azure-integration"
280+
],
281+
"test:bridge:monolog-http": [
282+
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-monolog-http-unit"
283+
],
284+
"test:bridge:symfony-http-foundation": [
285+
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-symfony-http-foundation-unit",
286+
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-symfony-http-foundation-integration"
287+
],
288+
"test:adapter:chartjs": [
289+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-chartjs-unit",
290+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-chartjs-integration"
291+
],
292+
"test:adapter:csv": [
293+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-csv-unit",
294+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-csv-integration"
295+
],
296+
"test:adapter:doctrine": [
297+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-doctrine-unit",
298+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-doctrine-integration"
299+
],
300+
"test:adapter:elasticsearch": [
301+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-elasticsearch-unit",
302+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-elasticsearch-integration"
303+
],
304+
"test:adapter:google-sheet": [
305+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-google-sheet-unit"
306+
],
307+
"test:adapter:http": [
308+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-http-unit",
309+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-http-integration"
310+
],
311+
"test:adapter:json": [
312+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-json-integration"
313+
],
314+
"test:adapter:logger": [
315+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-logger-unit"
316+
],
317+
"test:adapter:meilisearch": [
318+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-meilisearch-integration"
319+
],
320+
"test:adapter:parquet": [
321+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-parquet-unit",
322+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-parquet-integration"
323+
],
324+
"test:adapter:text": [
325+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-text-integration"
326+
],
327+
"test:adapter:xml": [
328+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-xml-unit",
329+
"tools/phpunit/vendor/bin/phpunit --testsuite=adapter-xml-integration"
330+
],
331+
217332
"test:docs": [
218333
"docker run -t --rm -v $PWD:/app norberttech/md-link-linter --exclude=vendor --exclude=.scratchpad --exclude=examples --exclude=documentation ."
219334
],

0 commit comments

Comments
 (0)