75
75
apk add \
76
76
unzip \
77
77
- name : Install mongodb PHP extension
78
- if : matrix.php != '7.1'
79
78
run : |
80
79
apk add $PHPIZE_DEPS
81
80
pecl install mongodb-1.5.5
88
87
run : |
89
88
composer global require --prefer-dist --no-progress --no-suggest --ansi \
90
89
symfony/flex
91
- - name : Remove Doctrine MongoDB ODM
92
- if : matrix.php == '7.1'
93
- run : |
94
- composer remove --dev --no-progress --no-update --ansi \
95
- doctrine/mongodb-odm \
96
- doctrine/mongodb-odm-bundle \
97
90
- name : Update project dependencies
98
91
run : composer update --no-progress --no-suggest --prefer-stable --prefer-lowest --ansi
99
92
- name : Clear test app cache
@@ -139,7 +132,6 @@ jobs:
139
132
pdo_pgsql \
140
133
;
141
134
- name : Install mongodb PHP extension
142
- if : matrix.php != '7.1'
143
135
run : |
144
136
apk add $PHPIZE_DEPS
145
137
pecl install mongodb-1.5.5
@@ -152,12 +144,6 @@ jobs:
152
144
run : |
153
145
composer global require --prefer-dist --no-progress --no-suggest --ansi \
154
146
symfony/flex
155
- - name : Remove Doctrine MongoDB ODM
156
- if : matrix.php == '7.1'
157
- run : |
158
- composer remove --dev --no-progress --no-update --ansi \
159
- doctrine/mongodb-odm \
160
- doctrine/mongodb-odm-bundle \
161
147
- name : Update project dependencies
162
148
run : composer update --no-progress --no-suggest --ansi
163
149
- name : Clear test app cache
@@ -203,7 +189,6 @@ jobs:
203
189
pdo_mysql \
204
190
;
205
191
- name : Install mongodb PHP extension
206
- if : matrix.php != '7.1'
207
192
run : |
208
193
apk add $PHPIZE_DEPS
209
194
pecl install mongodb-1.5.5
@@ -216,12 +201,104 @@ jobs:
216
201
run : |
217
202
composer global require --prefer-dist --no-progress --no-suggest --ansi \
218
203
symfony/flex
219
- - name : Remove Doctrine MongoDB ODM
220
- if : matrix.php == '7.1'
204
+ - name : Update project dependencies
205
+ run : composer update --no-progress --no-suggest --ansi
206
+ - name : Clear test app cache
207
+ run : tests/Fixtures/app/console cache:clear --ansi
208
+ - name : Run PHPUnit tests
209
+ run : vendor/bin/phpunit --colors=always
210
+
211
+ phpunit-mongodb :
212
+ name : PHPUnit (PHP ${{ matrix.php }}) (MongoDB)
213
+ runs-on : ubuntu-latest
214
+ container :
215
+ image : php:${{ matrix.php }}-alpine
216
+ services :
217
+ mongo :
218
+ image : mongo:4
219
+ options : >-
220
+ --health-cmd "mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'"
221
+ --health-interval 10s
222
+ --health-timeout 5s
223
+ --health-retries 5
224
+ strategy :
225
+ matrix :
226
+ php :
227
+ - ' 7.3'
228
+ fail-fast : false
229
+ env :
230
+ APP_ENV : mongodb
231
+ MONGODB_URL : mongodb://mongo:27017
232
+ steps :
233
+ - name : Checkout
234
+ uses : actions/checkout@v1
235
+ - name : Install system packages
221
236
run : |
222
- composer remove --dev --no-progress --no-update --ansi \
223
- doctrine/mongodb-odm \
224
- doctrine/mongodb-odm-bundle \
237
+ apk add \
238
+ unzip \
239
+ - name : Install mongodb PHP extension
240
+ run : |
241
+ apk add $PHPIZE_DEPS
242
+ pecl install mongodb-1.5.5
243
+ docker-php-ext-enable mongodb
244
+ - name : Disable PHP memory limit
245
+ run : echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini
246
+ - name : Install Composer
247
+ run : wget -qO - https://raw.githubusercontent.com/composer/getcomposer.org/fb22b78362d31c0d2bf516d1f8cdfd2745caa431/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
248
+ - name : Install Symfony Flex
249
+ run : |
250
+ composer global require --prefer-dist --no-progress --no-suggest --ansi \
251
+ symfony/flex
252
+ - name : Update project dependencies
253
+ run : composer update --no-progress --no-suggest --ansi
254
+ - name : Clear test app cache
255
+ run : tests/Fixtures/app/console cache:clear --ansi
256
+ - name : Run PHPUnit tests
257
+ run : vendor/bin/phpunit --colors=always --configuration phpunit_mongodb.xml
258
+
259
+ phpunit-elasticsearch :
260
+ name : PHPUnit (PHP ${{ matrix.php }}) (Elasticsearch)
261
+ runs-on : ubuntu-latest
262
+ container :
263
+ image : php:${{ matrix.php }}-alpine
264
+ services :
265
+ elasticsearch :
266
+ image : docker.elastic.co/elasticsearch/elasticsearch:6.8.3 # https://github.com/elastic/elasticsearch/issues/43627
267
+ env :
268
+ discovery.type : single-node
269
+ options : >-
270
+ --health-cmd "if health=\$(curl -fsSL 'http://127.0.0.1:9200/_cat/health?h=status'); then health=""\"""\$(echo ""\"""\$health""\""" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')""\"""; if [ "\$health" = 'green' ]; then exit 0; fi; echo >&2 ""\"""unexpected health status: \$health""\"""; fi; exit 1;"
271
+ --health-interval 10s
272
+ --health-timeout 5s
273
+ --health-retries 5
274
+ strategy :
275
+ matrix :
276
+ php :
277
+ - ' 7.3'
278
+ fail-fast : false
279
+ env :
280
+ APP_ENV : elasticsearch
281
+ ELASTICSEARCH_URL : http://elasticsearch:9200
282
+ steps :
283
+ - name : Checkout
284
+ uses : actions/checkout@v1
285
+ - name : Install system packages
286
+ run : |
287
+ apk add \
288
+ unzip \
289
+ - name : Install mongodb PHP extension
290
+ run : |
291
+ apk add $PHPIZE_DEPS
292
+ pecl install mongodb-1.5.5
293
+ docker-php-ext-enable mongodb
294
+ - name : Disable PHP memory limit
295
+ run : echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini
296
+ - name : Install Composer
297
+ run : wget -qO - https://raw.githubusercontent.com/composer/getcomposer.org/fb22b78362d31c0d2bf516d1f8cdfd2745caa431/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
298
+ - name : Install Symfony Flex
299
+ run : |
300
+ composer global require --prefer-dist --no-progress --no-suggest --ansi \
301
+ symfony/flex
225
302
- name : Update project dependencies
226
303
run : composer update --no-progress --no-suggest --ansi
227
304
- name : Clear test app cache
@@ -249,7 +326,6 @@ jobs:
249
326
apk add \
250
327
unzip \
251
328
- name : Install mongodb PHP extension
252
- if : matrix.php != '7.1'
253
329
run : |
254
330
apk add $PHPIZE_DEPS
255
331
pecl install mongodb-1.5.5
@@ -262,12 +338,6 @@ jobs:
262
338
run : |
263
339
composer global require --prefer-dist --no-progress --no-suggest --ansi \
264
340
symfony/flex
265
- - name : Remove Doctrine MongoDB ODM
266
- if : matrix.php == '7.1'
267
- run : |
268
- composer remove --dev --no-progress --no-update --ansi \
269
- doctrine/mongodb-odm \
270
- doctrine/mongodb-odm-bundle \
271
341
- name : Update project dependencies
272
342
run : composer update --no-progress --no-suggest --ansi
273
343
- name : Clear test app cache
0 commit comments