Repository navigation
fix(ci): show the server log when a Playwright test fails - #192
Open
oleksandr-nc wants to merge 1 commit into
Open
oleksandr-nc wants to merge 1 commit into
oleksandr-nc wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Show Nextcloud log on failure step printed nothing when a test had failed. With
CIset,playwright/start-server.mjsstops the test server when Playwright ends, and that removes the container before the step can read the log.@nextcloud/e2e-test-serversaves the log first whenNEXTCLOUD_E2E_LOG_FILEis set. The workflow now sets it totest-results/nextcloud.log, and the step prints that file. The report upload already includestest-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
catinside 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)