From e95fc204290462c62b0f4d1abcac7e4635c6f72f Mon Sep 17 00:00:00 2001 From: Justin Freeman Date: Thu, 1 Oct 2026 12:51:00 +1000 Subject: [PATCH] Disable PHPUnit result cache in phpunit workflow www-data cannot write to the bind-mounted extension directory, so PHPUnit warned about failing to write .phpunit.result.cache on every run. --- .github/workflows/civicrm-phpunit-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/civicrm-phpunit-tests.yml b/.github/workflows/civicrm-phpunit-tests.yml index c9473e5..96586e1 100644 --- a/.github/workflows/civicrm-phpunit-tests.yml +++ b/.github/workflows/civicrm-phpunit-tests.yml @@ -190,11 +190,12 @@ jobs: # docker exec does not populate it from -w on its own. # --log-junit writes to /tmp inside the container, not the extension # dir: that's a bind mount owned by the runner's user, and www-data - # can't write into it. + # can't write into it. For the same reason, --do-not-cache-result + # stops PHPUnit trying (and warning) to write .phpunit.result.cache. docker exec -u www-data \ -w ${{ env.EXTENSION_DIR }} \ -e PWD=${{ env.EXTENSION_DIR }} \ - wordpress phpunit9 --log-junit /tmp/phpunit-results.xml ${{ inputs.PHPUNIT_ARGS }} + wordpress phpunit9 --do-not-cache-result --log-junit /tmp/phpunit-results.xml ${{ inputs.PHPUNIT_ARGS }} - name: Copy PHPUnit results out of container if: always()