Skip to content

playwright-test: add an upload input that keeps a green run's screenshots - #79

Merged
cshuttle merged 1 commit into
mainfrom
feat/playwright-upload-always
Oct 19, 2026
Merged

cshuttle merged 1 commit into
mainfrom
feat/playwright-upload-always

Conversation

@cshuttle

Copy link
Copy Markdown
Owner

Summary

playwright-test.yml (workflow_call)
  inputs
    upload: failure | always        # new, default failure
  lockstep
    check the upload input          # new: rejects any other value
    shards
  test
    ...
    upload-artifact (playwright-report)
      if: failure() || inputs.upload == 'always'     # was: if: failure()
   inputs:
+    upload:
+      type: string
+      default: failure
   ...
     - uses: actions/upload-artifact@cf430e0 # v7
-      if: failure()
+      if: failure() || inputs.upload == 'always'

The README gets a short note on the input.

Evidence

  • Before: MSD's green run https://github.com/cshuttle/MSD/actions/runs/39190348556 passes its test job and uploads no artifact. Its screenshots exist only on the runner, because the upload step is if: failure().
    After: the same caller with upload: always on the release that carries this change. The link goes in a follow-up comment on this PR once that run is green.
  • actionlint 1.7.12 (the version selftest uses) passes on playwright-test.yml, and on every other workflow in this repo.

Merge Danger

Door: two-way for this PR. It adds an input whose default keeps today's behaviour, so a revert restores the old workflow exactly. Once a release tag exists, it is one-way: released tags never move, and a bad one is superseded by a patch.

The release that follows this PR (v1.12.0) is cut from main, which already carries #77. That bumps the Playwright image default to v1.64.0-noble. The image is mirrored on ghcr and exists upstream on MCR. Any caller that moves to v1.12.0 without also moving its @playwright/test pin to 1.64.0 fails lockstep, as MSD#41 does. The README already states that rule.

Blast radius: every caller of playwright-test.yml, but only through the new input. Existing callers that do not set upload see no change, and upload cannot be set by accident, because its default is failure. Callers that adopt v1.12.0 also inherit the v1.64.0 default described above.

🤖 Generated with Claude Code

The playwright-report artifact (the report and test-results/, screenshots included) was
uploaded only on failure, so a passing run kept no screenshots to review. A new `upload`
input, default `failure`, makes the upload step run on `failure() || inputs.upload == 'always'`.
Every existing caller keeps the failure-only behaviour unchanged. A value other than `failure`
or `always` fails the lockstep job before any pod is spent, so a typo cannot skip the artifact.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@cshuttle
cshuttle merged commit a52ec94 into main Oct 19, 2026
13 checks passed
@cshuttle
cshuttle deleted the feat/playwright-upload-always branch October 19, 2026 02:37
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