Skip to content

Mount test project at /home/debian/project instead of CircleCI path - #527

Merged
rebeccahum merged 1 commit into
mainfrom
fix/test-runner-debian-path
Oct 5, 2026
Merged

rebeccahum merged 1 commit into
mainfrom
fix/test-runner-debian-path

Conversation

@rebeccahum

Copy link
Copy Markdown
Contributor

Description

__tests__/bin/test.sh mounts the project at /home/circleci/project. That path is a leftover from CircleCI: the wp-test-runner image's real project directory is /home/debian/project (user debian), and /home/circleci only exists as a compatibility symlink in the image's Dockerfile. We plan to remove that symlink from Automattic/vip-container-images. Without it, this script would mount into a directory the runner doesn't use, and tests would fail before running with:

PHP Fatal error:  Failed opening required '/home/debian/.config/composer/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php'

This PR mounts the project at /home/debian/project and passes -e APP_HOME and -w for that path explicitly, so the runner finds vendor/ and runs from the project directory on the current image and on older cached images with a different default home.

Same change as Automattic/vip-go-mu-plugins#7300. CI doesn't use this script, so no workflow changes are needed.

Steps to Test

  1. Check out this branch, then run composer install.
  2. docker pull ghcr.io/automattic/vip-container-images/wp-test-runner:latest
  3. ./__tests__/bin/test.sh
  4. Output shows Working directory: /home/debian/project and PHPUnit executable: /home/debian/project/vendor/bin/phpunit, and tests run.

Local result: OK (40 tests, 256 assertions, 2 skipped).

🤖 Generated with Claude Code

The wp-test-runner image's project directory is /home/debian/project.
/home/circleci is a CircleCI leftover that the image keeps only as a
compatibility symlink, which is going to be removed from
vip-container-images.

Mount the project at the real path and pass APP_HOME and the working
directory explicitly, so the runner finds vendor/ on current images and
on older cached images with a different default home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@rebeccahum
rebeccahum merged commit 2e72c7e into main Oct 5, 2026
5 of 16 checks passed
@rebeccahum
rebeccahum deleted the fix/test-runner-debian-path branch October 5, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant