feat: add Playwright last-run composites for failed-only re-runs - #58
Merged
Merged
Conversation
Add lean composite actions for failed-only Playwright runs on GitHub Actions re-runs. Upload and restore only .last-run.json. Ref: ED-25653 Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
3 tasks
Ref: ED-25653 Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
Ntnelbaba
marked this pull request as ready for review
September 27, 2026 17:10
…pload upload-artifact@v4 excludes dotfiles by default; set include-hidden-files so save uploads staged .last-run.json. Ref: ED-25653 Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
Svitlana-Dykun
approved these changes
Sep 28, 2026
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.
Summary
Adds lean composite actions under
actions/playwright-last-run/so Elementor Core and Pro can share Playwright failed-only on Actions re-run logic instead of duplicating inline workflow steps.restore: whengithub.run_attempt > 1, downloads the tiny prior artifact, restores.last-run.json, setsextra_args/PLAYWRIGHT_EXTRA_ARGSto--last-failedonly whenfailedTestsis non-empty (jq).save: when failures exist, uploads only.last-run.jsonwithretention-days: 1,include-hidden-files: true, andif-no-files-found: ignore.Jira
https://elementor.atlassian.net/browse/ED-25653
Inputs / outputs
See
actions/playwright-last-run/README.md. Summary:restoreartifact-name,last-run-paths, optionalgithub-token,download-pathextra_args(""or--last-failed)saveartifact-name,last-run-paths, optionalstaging-diruploaded(true/false)Example
uses:(Core)Elements regression path:
tests/elements-regression/test-results/.last-run.json.Example
uses:(Pro)After merge, pin workflows to the merge commit SHA instead of
@main.QA
restore.sh/save.shsavesetsinclude-hidden-files: truefor.last-run.json(Pro #7675 validation)✨ PR Description
1. Problem & Context
Implements optimized Playwright re-runs by persisting only the
.last-run.jsonstate between GitHub Action attempts, avoiding full shard execution on failures.2. What Changed (Where)
actions/playwright-last-run/restore/: New composite action and script to restore failure state.actions/playwright-last-run/save/: New composite action and script to stage failure state.actions/playwright-last-run/README.md: Documentation for implementation and inputs.3. How It Works
save.shusesjqto detect failed tests and uploads.last-run.jsonas a 1-day artifact. On re-runs (run_attempt > 1),restore.shdownloads this artifact, restores it to specified paths, and outputs--last-failedto trigger Playwright's targeted re-run mode.4. Risks
Dependency on
jqavailability on the runner; mitigated by targetingubuntu-latestwhere it is pre-installed.Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how