Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci-test-a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ jobs:
BUILD_COMMAND: ${{ inputs.build-command || 'npm run build:prod' }}
run: bash -eo pipefail -c "$BUILD_COMMAND"

# wp-env keeps WordPress core and the PHPUnit test library under WP_ENV_HOME
# (default ~/.wp-env) and bind-mounts them into its containers. On self-hosted
# runners whose Docker daemon runs in a separate container (ARC with dind), only
# the work directory is shared with the daemon, so mounts from ~ come up empty and
# PHPUnit fails to load /wordpress-phpunit. RUNNER_TEMP is inside the work
# directory on every runner type, and the runner sets it, so writing it to
# $GITHUB_ENV is safe.
- name: Keep wp-env files in the runner work directory
shell: bash
run: echo "WP_ENV_HOME=$RUNNER_TEMP/wp-env" >> "$GITHUB_ENV"

- name: Start wp-env
run: npm run wp-env start

Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/ci-test-build-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,17 @@ jobs:
echo "Generated .wp-env.override.json:"
cat .wp-env.override.json

# wp-env keeps WordPress core and the PHPUnit test library under WP_ENV_HOME
# (default ~/.wp-env) and bind-mounts them into its containers. On self-hosted
# runners whose Docker daemon runs in a separate container (ARC with dind), only
# the work directory is shared with the daemon, so mounts from ~ come up empty and
# PHPUnit fails to load /wordpress-phpunit. RUNNER_TEMP is inside the work
# directory on every runner type, and the runner sets it, so writing it to
# $GITHUB_ENV is safe.
- name: Keep wp-env files in the runner work directory
shell: bash
run: echo "WP_ENV_HOME=$RUNNER_TEMP/wp-env" >> "$GITHUB_ENV"

- name: Start wp-env
shell: bash
run: |
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci-test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ jobs:
esac
echo "WP_ENV_CORE=$core" | tee -a "$GITHUB_ENV"

# wp-env keeps WordPress core and the PHPUnit test library under WP_ENV_HOME
# (default ~/.wp-env) and bind-mounts them into its containers. On self-hosted
# runners whose Docker daemon runs in a separate container (ARC with dind), only
# the work directory is shared with the daemon, so mounts from ~ come up empty and
# PHPUnit fails to load /wordpress-phpunit. RUNNER_TEMP is inside the work
# directory on every runner type, and the runner sets it, so writing it to
# $GITHUB_ENV is safe.
- name: Keep wp-env files in the runner work directory
if: ${{ inputs.use-wp-env }}
shell: bash
run: echo "WP_ENV_HOME=$RUNNER_TEMP/wp-env" >> "$GITHUB_ENV"

- name: Start wp-env
if: ${{ inputs.use-wp-env }}
run: npm run wp-env start
Expand Down
Loading