Skip to content

Commit ee74923

Browse files
mydeaclaude
andcommitted
fix(ci): Remove container from E2E jobs — they need host Docker access
E2E tests use Docker-in-Docker (Verdaccio registry) which doesn't work inside a GHA container due to network isolation. On develop these jobs run directly on the host. Only browser Playwright, loader, and Remix tests need the Playwright container image. Revert registrySetup.ts path conversion and temp directory changes for E2E jobs since they now run on the host again. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bf1fe01 commit ee74923

3 files changed

Lines changed: 14 additions & 36 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -922,15 +922,8 @@ jobs:
922922
# See: https://github.com/actions/runner/issues/2205
923923
if:
924924
always() && needs.job_e2e_prepare.result == 'success' && needs.job_e2e_prepare.outputs.matrix != '{"include":[]}'
925-
&& needs.job_playwright_image.result == 'success'
926-
needs: [job_get_metadata, job_build, job_e2e_prepare, job_playwright_image]
925+
needs: [job_get_metadata, job_build, job_e2e_prepare]
927926
runs-on: ubuntu-24.04
928-
container:
929-
image: ${{ needs.job_playwright_image.outputs.image }}
930-
credentials:
931-
username: ${{ github.actor }}
932-
password: ${{ secrets.GITHUB_TOKEN }}
933-
options: --ipc=host --user root
934927
timeout-minutes: 15
935928
env:
936929
# We just use a dummy DSN here, only send to the tunnel anyhow
@@ -1003,18 +996,18 @@ jobs:
1003996
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
1004997

1005998
- name: Copy to temp
1006-
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ../tmp-test-application
999+
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ${{ runner.temp }}/test-application
10071000
working-directory: dev-packages/e2e-tests
10081001

10091002
- name: Build E2E app
1010-
working-directory: dev-packages/tmp-test-application
1003+
working-directory: ${{ runner.temp }}/test-application
10111004
timeout-minutes: 7
10121005
run: ${{ matrix.build-command || 'pnpm test:build' }}
10131006
env:
10141007
SENTRY_E2E_WORKSPACE_ROOT: ${{ github.workspace }}
10151008

10161009
- name: Run E2E test
1017-
working-directory: dev-packages/tmp-test-application
1010+
working-directory: ${{ runner.temp }}/test-application
10181011
timeout-minutes: 10
10191012
run: ${{ matrix.assert-command || 'pnpm test:assert' }}
10201013
env:
@@ -1053,16 +1046,9 @@ jobs:
10531046
if:
10541047
always() && needs.job_get_metadata.outputs.is_release != 'true' && needs.job_e2e_prepare.result == 'success' &&
10551048
needs.job_e2e_prepare.outputs.matrix-optional != '{"include":[]}' && (github.event_name != 'pull_request' ||
1056-
github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]' &&
1057-
needs.job_playwright_image.result == 'success'
1058-
needs: [job_get_metadata, job_build, job_e2e_prepare, job_playwright_image]
1049+
github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]'
1050+
needs: [job_get_metadata, job_build, job_e2e_prepare]
10591051
runs-on: ubuntu-24.04
1060-
container:
1061-
image: ${{ needs.job_playwright_image.outputs.image }}
1062-
credentials:
1063-
username: ${{ github.actor }}
1064-
password: ${{ secrets.GITHUB_TOKEN }}
1065-
options: --ipc=host --user root
10661052
timeout-minutes: 15
10671053
env:
10681054
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
@@ -1122,16 +1108,16 @@ jobs:
11221108
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
11231109

11241110
- name: Copy to temp
1125-
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ../tmp-test-application
1111+
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ${{ runner.temp }}/test-application
11261112
working-directory: dev-packages/e2e-tests
11271113

11281114
- name: Build E2E app
1129-
working-directory: dev-packages/tmp-test-application
1115+
working-directory: ${{ runner.temp }}/test-application
11301116
timeout-minutes: 7
11311117
run: ${{ matrix.build-command || 'pnpm test:build' }}
11321118

11331119
- name: Run E2E test
1134-
working-directory: dev-packages/tmp-test-application
1120+
working-directory: ${{ runner.temp }}/test-application
11351121
timeout-minutes: 10
11361122
run: ${{ matrix.assert-command || 'pnpm test:assert' }}
11371123

.github/workflows/canary.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,16 @@ jobs:
180180
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
181181

182182
- name: Copy to temp
183-
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ../tmp-test-application
183+
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ${{ runner.temp }}/test-application
184184
working-directory: dev-packages/e2e-tests
185185

186186
- name: Build E2E app
187-
working-directory: dev-packages/tmp-test-application
187+
working-directory: ${{ runner.temp }}/test-application
188188
timeout-minutes: 7
189189
run: yarn ${{ matrix.build-command }}
190190

191191
- name: Run E2E test
192-
working-directory: dev-packages/tmp-test-application
192+
working-directory: ${{ runner.temp }}/test-application
193193
timeout-minutes: 15
194194
run: yarn test:assert
195195

dev-packages/e2e-tests/registrySetup.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@ import * as path from 'path';
44
import { PUBLISH_PACKAGES_DOCKER_IMAGE_NAME, TEST_REGISTRY_CONTAINER_NAME, VERDACCIO_VERSION } from './lib/constants';
55

66
const publishScriptNodeVersion = process.env.E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION;
7-
8-
// When running inside a GHA container, paths resolve to /__w/... which only
9-
// exists inside the container. Docker-in-Docker mounts need host paths.
10-
// The host maps /home/runner/work to /__w, so we convert back.
11-
function toHostPath(p: string): string {
12-
return p.replace(/^\/__w\//, '/home/runner/work/');
13-
}
14-
15-
const repositoryRoot = toHostPath(path.resolve(__dirname, '../..'));
7+
const repositoryRoot = path.resolve(__dirname, '../..');
168

179
// https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
1810
function groupCIOutput(groupTitle: string, fn: () => void): void {
@@ -43,7 +35,7 @@ export function registrySetup(): void {
4335
'-p',
4436
'4873:4873',
4537
'-v',
46-
`${toHostPath(__dirname)}/verdaccio-config:/verdaccio/conf`,
38+
`${__dirname}/verdaccio-config:/verdaccio/conf`,
4739
`verdaccio/verdaccio:${VERDACCIO_VERSION}`,
4840
],
4941
{ encoding: 'utf8', stdio: 'inherit' },

0 commit comments

Comments
 (0)