Repository navigation
Conversation
The playwright composite detects Node and the package manager from the lockfile, installs dependencies through setup-node's cache, caches the browsers on the installed @playwright/test version, and runs `playwright test` with the github, junit and blob reporters: one check annotation per failure with file and line, counts in the step summary and as outputs, an HTML report built from the blob, and traces, videos and screenshots uploaded when tests fail. target-url is exported as BASE_URL for the repo's playwright.config. e2e-playwright.yml plans a shard matrix from the shards input, runs one composite per shard and, above one shard, merges the blobs into a single HTML report with the same Playwright version. The fixture project (webServer, two passing specs, a failing spec enabled by E2E_FIXTURE_FAIL) runs in CI twice: once passing, once failing with the expected count. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
|
|
||
| - name: Install pnpm | ||
| if: ${{ steps.detect.outputs.pm == 'pnpm' }} | ||
| uses: pnpm/action-setup@d9184bf108216479bc5a137cc391f4d7b14c870b # v6.1.0 |
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.
Closes #75. Stacked on #147 (
issue-72-test-node) for the Node setup pattern (setup-node,pnpm/action-setup, lockfile detection); retarget once that merges.What
.github/actions/playwright: Node version and package manager from the lockfile (same detection asnode-test),setup-nodewith the package-manager cache, install, read the installed@playwright/testversion,actions/cacheon~/.cache/ms-playwrightkeyed on that version and the browser list,playwright install --with-deps(onlyinstall-depson a cache hit), thenplaywright test --reporter=github,junit,blobwith--projectand--shard i/nwhen given andBASE_URLexported fromtarget-url.summary.py(stdlib) turns the JUnit XML into a per-file table and a failure list in the step summary and thetests-total,tests-failed,tests-skippedoutputs; annotations come from thegithubreporter (file and line). HTML report built from the blob withmerge-reports. Artefacts: JUnit, blob and HTML always (<name>-results[-shard]),test-results/with traces, videos and screenshots on failure (<name>-traces[-shard]). Final gate step fails on a non-zeroplaywright testexit.e2e-playwright.yml: inputs from the issue plusbrowsers,extra-args,runtime-version,install-command,actions-ref.shardsjob builds the matrix,testruns one composite per shard (fail-fast: false),report(only whenshards > 1) downloads the shard blobs and runsnpx @playwright/test@<same version> merge-reports --reporter htmlintoplaywright-report.tests/e2e-playwright/fixtures/project:@playwright/test1.64.0 pinned with a lockfile,server.jsas thewebServer, two passing specs and a failing spec enabled byE2E_FIXTURE_FAIL;playwright.config.jsis the documented config contract (BASE_URL,trace: retain-on-failure).E2E Playwrightjob:summary.pyfixtures, the composite on the fixture (3 tests, 0 failed), then withE2E_FIXTURE_FAIL=1expecting failure withtests-failed=1.Tests
tests/e2e-playwright/run.shwith recorded Playwright JUnit (pass with a skipped test, one failure): counts, outputs, headings with and without a shard, suite rows, failure message, no duplicate annotations, exit codes. Verified locally with Playwright 1.64.0: passing run, failing run (annotation::error file=tests/failing.spec.js,...,line=7),--shard 1/2blob andmerge-reports --reporter html.Deferred
🤖 Generated with Claude Code
https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF