e2e: run health probe + Playwright on the compose network
CI / Test (rest) (pull_request) Successful in 24s
CI / Lint (pull_request) Successful in 23s
CI / Test (store) (pull_request) Successful in 54s
CI / Build (windows/amd64) (pull_request) Successful in 23s
CI / Build (linux/amd64) (pull_request) Successful in 23s
CI / Build (linux/arm64) (pull_request) Successful in 23s
CI / Test (server-http) (pull_request) Successful in 3m8s
e2e / Playwright vs docker-compose (pull_request) Failing after 2m17s
CI / Test (rest) (pull_request) Successful in 24s
CI / Lint (pull_request) Successful in 23s
CI / Test (store) (pull_request) Successful in 54s
CI / Build (windows/amd64) (pull_request) Successful in 23s
CI / Build (linux/amd64) (pull_request) Successful in 23s
CI / Build (linux/arm64) (pull_request) Successful in 23s
CI / Test (server-http) (pull_request) Successful in 3m8s
e2e / Playwright vs docker-compose (pull_request) Failing after 2m17s
Gitea's act-style runners execute workflow steps inside a runner container, so compose's host port-publish (127.0.0.1:8080:8080) is not reachable from the steps. PR #23's e2e job timed out waiting for the server even though the container was up and listening. Move both the health probe and the Playwright run onto rmnet so they address the server as http://server:8080: * health probe: docker run --rm --network e2e_rmnet curlimages/curl * Playwright: new mcr.microsoft.com/playwright-based image, added as a profile-gated `playwright` service in compose.e2e.yml, invoked via `docker compose run --rm playwright`. Drops the setup-node + npm install runner steps.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Playwright runner for the e2e suite. Built and run by
|
||||
# e2e/compose.e2e.yml so the test process sits on the same docker
|
||||
# network as the server, agent, and rest-server. The previous setup
|
||||
# ran Playwright on the workflow runner host and reached the server
|
||||
# via 127.0.0.1:8080; that fails on Gitea's act-style runners
|
||||
# because the workflow steps execute inside a runner container,
|
||||
# not on the host where compose publishes its ports.
|
||||
|
||||
FROM mcr.microsoft.com/playwright:v1.50.0-jammy
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
# Install npm deps in a separate layer keyed off package.json so
|
||||
# changes to specs don't bust the dep cache.
|
||||
COPY e2e/playwright/package.json /work/package.json
|
||||
RUN npm install --no-audit --no-fund
|
||||
|
||||
COPY e2e/playwright/ /work/
|
||||
|
||||
ENV CI=1
|
||||
ENTRYPOINT ["npx", "playwright", "test"]
|
||||
Reference in New Issue
Block a user