2828 - ' 8.2'
2929 - ' 8.3'
3030 - ' 8.4'
31+ - ' 8.5'
3132 wordpress :
3233 - ' 6.5'
3334 - ' 6.7'
7677 - name : Running unit tests
7778 run : |
7879 set -o pipefail
79- npm run test
80+ npm run test
81+
82+ # ------------------------------------------------ #
83+ # Build Plugin and Run Tests on Built Distribution #
84+ # ------------------------------------------------ #
85+
86+ - name : Stop Docker environment
87+ # Remove this check when https://github.com/humbug/php-scoper/issues/1139 is resolved.
88+ if : matrix.php != '8.5'
89+ run : npm run wp-env stop
90+
91+ - name : Build Plugin
92+ if : matrix.php != '8.5'
93+ run : bin/build.sh
94+
95+ - name : Copy Test Files
96+ if : matrix.php != '8.5'
97+ run : |
98+ cp .wp-env.json dist/.wp-env.json
99+ cp package.json dist/package.json
100+ cp package-lock.json dist/package-lock.json
101+ cp phpcs.xml dist/phpcs.xml
102+ cp phpunit.xml dist/phpunit.xml
103+ cp -r tests dist/tests
104+
105+ - name : Install Dist Composer Dependencies
106+ if : matrix.php != '8.5'
107+ working-directory : dist
108+ run : composer install --no-interaction --no-progress --no-suggest --optimize-autoloader
109+
110+ - name : Start Dist Docker environment
111+ if : matrix.php != '8.5'
112+ working-directory : dist
113+ run : npm run wp-env start
114+
115+ - name : Log running Dist Docker containers
116+ if : matrix.php != '8.5'
117+ working-directory : dist
118+ run : docker ps -a
119+
120+ - name : Running Dist unit tests
121+ if : matrix.php != '8.5'
122+ working-directory : dist
123+ # We don't run phpcs here because the dist files are modified by the build script.
124+ run : |
125+ set -o pipefail
126+ npm run test:php
0 commit comments