Skip to content

fix(ci): show the server log when a Playwright test fails - #192

Open
oleksandr-nc wants to merge 1 commit into
mainfrom
ci/playwright-server-log
Open

oleksandr-nc wants to merge 1 commit into
mainfrom
ci/playwright-server-log

Conversation

@oleksandr-nc

Copy link
Copy Markdown
Contributor

The Show Nextcloud log on failure step printed nothing when a test had failed. With CI set, playwright/start-server.mjs stops the test server when Playwright ends, and that removes the container before the step can read the log.

@nextcloud/e2e-test-server saves the log first when NEXTCLOUD_E2E_LOG_FILE is set. The workflow now sets it to test-results/nextcloud.log, and the step prints that file. The report upload already includes test-results/, so the log is uploaded too.

Version 0.6.0 of the library read the log through the Docker copy API, which cannot see the tmpfs the data directory is on, so it saved nothing. The dependency moves to 0.6.1, which reads the log by running cat inside the container. The lockfile changes in that package only.

If the server script fails during setup and leaves its container running, the step falls back to reading the log from that container, as before.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

The workflow step that shows the Nextcloud log on failure printed
nothing when a test had failed. With CI set, playwright/start-server.mjs
stops the test server when Playwright ends, and that removes the
container before the step can read the log from it.

@nextcloud/e2e-test-server saves the log first when
NEXTCLOUD_E2E_LOG_FILE is set, so the workflow now sets it to
test-results/nextcloud.log, and the step prints that file. The report
upload already includes test-results/, so the log is uploaded too.
Version 0.6.0 of the library read the log through the Docker copy API,
which cannot see the tmpfs the data directory is on, so it saved
nothing. The dependency moves to 0.6.1, which reads the log by running
cat inside the container; the lockfile changes in that package only.

If the server script fails during setup and leaves its container
running, the step falls back to reading the log from that container, as
it did before.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>

This branch has not been deployed

No deployments
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