File tree Expand file tree Collapse file tree 3 files changed +12
-15
lines changed Expand file tree Collapse file tree 3 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 2727 - name : Install Playwright browsers
2828 run : npx playwright install --with-deps
2929
30- - name : Setup WordPress test environment
31- run : composer run wp-setup
32-
33- - name : Start WordPress test environment
34- run : composer run wp-test-start
35-
3630 - name : Run WordPress end-to-end tests
3731 run : composer run wp-test-e2e
3832
Original file line number Diff line number Diff line change 2424 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
2525 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
2626
27- - name : Setup WordPress test environment
28- run : composer run wp-setup
29-
30- - name : Start WordPress test environment
31- run : composer run wp-test-start
32-
3327 - name : Run WordPress PHPUnit tests
3428 run : node .github/workflows/wp-tests-phpunit-run.js
3529
Original file line number Diff line number Diff line change 5151 " npm --prefix wordpress run env:cli -- plugin install gutenberg" ,
5252 " npm --prefix wordpress run env:cli -- plugin install query-monitor"
5353 ],
54+ "wp-test-ensure-env" : [
55+ " if [ ! -f wordpress/src/wp-load.php ]; then composer run wp-setup; fi" ,
56+ " @putenv COMPOSE_IGNORE_ORPHANS=true" ,
57+ " cd wordpress && if [ -z \" $(node tools/local-env/scripts/docker.js ps -q)\" ]; then cd ..; composer run wp-test-start; fi"
58+ ],
5459 "wp-test-php" : [
55- " rm -rf wordpress/src/wp-content/database && npm --prefix wordpress run test:php --"
60+ " @wp-test-ensure-env @no_additional_args" ,
61+ " rm -rf wordpress/src/wp-content/database/.ht.sqlite @no_additional_args" ,
62+ " npm --prefix wordpress run test:php -- @additional_args"
5663 ],
5764 "wp-test-e2e" : [
58- " npm --prefix wordpress run test:e2e --"
65+ " @wp-test-ensure-env @no_additional_args" ,
66+ " npm --prefix wordpress run test:e2e -- @additional_args"
5967 ],
6068 "wp-test-clean" : [
61- " npm --prefix wordpress run env:clean"
69+ " npm --prefix wordpress run env:clean" ,
70+ " rm -rf wordpress/src/wp-content/database/.ht.sqlite"
6271 ]
6372 }
6473}
You can’t perform that action at this time.
0 commit comments