Fix GitHub Actions workflow failures

- Add WP_PHPUNIT__DIR and WP_TESTS_DIR environment variables to PHPUnit workflow to fix 'WP_UnitTestCase not found' error
- Increase WordPress Playground server timeout from 60s to 180s with better progress logging to fix timeout failures
- Add conditional checks for SONAR_TOKEN and CODACY_PROJECT_TOKEN to gracefully skip analysis when tokens are not set
- Properly handle server process lifecycle in Playground tests (capture PID, kill on completion)
This commit is contained in:
2025-11-24 19:35:03 +00:00
parent eb388a846d
commit 1590be3ba6
6 changed files with 100 additions and 11 deletions

View File

@@ -57,6 +57,9 @@ jobs:
echo "WordPress test suite installed successfully"
- name: Run PHPUnit tests
env:
WP_PHPUNIT__DIR: /tmp/wordpress-tests-lib
WP_TESTS_DIR: /tmp/wordpress-tests-lib
run: |
if [ "${{ matrix.multisite }}" = "true" ]; then
WP_MULTISITE=1 composer test