@@ -156,6 +156,36 @@ jobs:
156
156
repo-token : ' ${{ secrets.GITHUB_TOKEN }}'
157
157
report-json : ' lint-js-report.json'
158
158
159
+ # -----------------------------------------------------------------------------------------------------------------------
160
+
161
+ normalize-composer :
162
+ name : ' Normalize composer.json'
163
+ needs : pre-run
164
+ if : needs.pre-run.outputs.changed-php-count > 0 || needs.pre-run.outputs.changed-gha-workflow-count > 0
165
+ runs-on : ubuntu-latest
166
+ steps :
167
+ - name : Checkout
168
+ uses : actions/checkout@v3
169
+
170
+ - name : Setup PHP
171
+ uses : shivammathur/setup-php@v2
172
+ with :
173
+ php-version : ' 8.1'
174
+ coverage : none
175
+
176
+ - name : Get composer-normalize.phar
177
+ run : |
178
+ wget https://github.com/ergebnis/composer-normalize/releases/latest/download/composer-normalize.phar
179
+ chmod +x composer-normalize.phar
180
+
181
+ - name : Validate composer.json
182
+ run : composer --no-interaction validate --no-check-all
183
+
184
+ - name : Normalize composer.json
185
+ run : |
186
+ composer config --no-interaction --no-plugins allow-plugins.ergebnis/composer-normalize true
187
+ ./composer-normalize.phar --dry-run
188
+
159
189
# -----------------------------------------------------------------------------------------------------------------------
160
190
161
191
lint-php :
@@ -189,18 +219,9 @@ jobs:
189
219
- name : Install Composer dependencies
190
220
run : composer install --prefer-dist --optimize-autoloader --no-progress --no-interaction
191
221
192
- - name : Validate composer.json
193
- run : composer --no-interaction validate --no-check-all
194
-
195
222
- name : Detect coding standard violations (PHPCS)
196
223
run : vendor/bin/phpcs -q --report=checkstyle --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 | cs2pr --graceful-warnings
197
224
198
- - name : Normalize composer.json
199
- run : |
200
- composer config --no-interaction --no-plugins allow-plugins.ergebnis/composer-normalize true
201
- composer require --no-interaction --dev ergebnis/composer-normalize --ignore-platform-reqs
202
- composer --no-interaction normalize --dry-run
203
-
204
225
# -----------------------------------------------------------------------------------------------------------------------
205
226
206
227
static-analysis-php :
@@ -362,12 +383,13 @@ jobs:
362
383
mysql :
363
384
image : mariadb:10
364
385
env :
365
- MYSQL_ALLOW_EMPTY_PASSWORD : true
366
- MYSQL_ROOT_PASSWORD :
367
- MYSQL_DATABASE : wordpress_test
386
+ MARIADB_ALLOW_EMPTY_ROOT_PASSWORD : true
387
+ MARIADB_DATABASE : wordpress_test
388
+ MARIADB_MYSQL_LOCALHOST_USER : 1
389
+ MARIADB_MYSQL_LOCALHOST_GRANTS : USAGE
368
390
ports :
369
391
- 3306
370
- options : --health-cmd="mysqladmin ping " --health-interval=10s --health-timeout=5s --health-retries=3
392
+ options : --health-cmd="healthcheck.sh --su-mysql --connect --innodb_initialized " --health-interval=10s --health-timeout=5s --health-retries=3
371
393
continue-on-error : ${{ matrix.experimental == true }}
372
394
strategy :
373
395
fail-fast : false
@@ -606,12 +628,13 @@ jobs:
606
628
mysql :
607
629
image : mariadb:10
608
630
env :
609
- MYSQL_ALLOW_EMPTY_PASSWORD : true
610
- MYSQL_ROOT_PASSWORD :
611
- MYSQL_DATABASE : wordpress_test
631
+ MARIADB_ALLOW_EMPTY_ROOT_PASSWORD : true
632
+ MARIADB_DATABASE : wordpress_test
633
+ MARIADB_MYSQL_LOCALHOST_USER : 1
634
+ MARIADB_MYSQL_LOCALHOST_GRANTS : USAGE
612
635
ports :
613
636
- 3306
614
- options : --health-cmd="mysqladmin ping " --health-interval=10s --health-timeout=5s --health-retries=3
637
+ options : --health-cmd="healthcheck.sh --su-mysql --connect --innodb_initialized " --health-interval=10s --health-timeout=5s --health-retries=3
615
638
continue-on-error : ${{ matrix.experimental == true }}
616
639
strategy :
617
640
fail-fast : false
0 commit comments