@@ -180,6 +180,19 @@ jobs:
180180 php-version : ${{ matrix.php-versions }}
181181 coverage : xdebug
182182
183+ # Workaround for PHP 8.3 (and potentially other versions): the GitHub
184+ # Actions ubuntu-latest runner ships with a pre-installed PHP that leaves
185+ # an empty regular file at /run/php/php<version>-fpm.sock. setup-php
186+ # installs a different patch version on top, but PHP-FPM never replaces
187+ # the stale file with a real Unix socket, so nginx returns 502.
188+ # Removing the stale file and restarting PHP-FPM forces a clean socket.
189+ - name : Restart PHP-FPM
190+ run : |
191+ sudo rm -f /run/php/php${{ matrix.php-versions }}-fpm.sock
192+ sudo systemctl restart php${{ matrix.php-versions }}-fpm
193+ sleep 1
194+ ls -la /run/php/
195+
183196 # Configure nginx to use the PHP version and WOrdPress installation at /var/www/html
184197 - name : Configure nginx site
185198 run : |
@@ -305,7 +318,7 @@ jobs:
305318 # Run Codeception End to End Tests.
306319 - name : Run tests/${{ matrix.test-groups }}
307320 working-directory : ${{ env.PLUGIN_DIR }}
308- run : php vendor/bin/codecept run tests/${{ matrix.test-groups }} --fail-fast
321+ run : php vendor/bin/codecept run tests/${{ matrix.test-groups }} --env headless -- fail-fast
309322
310323 # Artifacts are data generated by this workflow that we want to access, such as log files, screenshots, HTML output.
311324 # The if: failure() directive means that this will run when the workflow fails e.g. if a test fails, which is needed
0 commit comments