Add Playwright composite action to reduce workflow duplication (#5754)

This PR introduces a reusable composite action for Playwright setup to
reduce duplication across workflows.

## Changes
- Created `.github/actions/setup-playwright/action.yml` composite action
that:
  - Detects or uses provided Playwright version
  - Caches Playwright browsers with intelligent cache keys
  - Installs browsers only when cache miss occurs
  - Installs OS dependencies when cache hit occurs
  
## Technical Details
- **Important:** The composite action requires `shell: bash` for all
`run` steps as per [GitHub Actions requirements for composite
actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action#creating-an-action-metadata-file).
This is a mandatory field for composite actions, unlike regular workflow
steps.
- Updated workflow paths to account for repository checkout locations
(some workflows checkout to subdirectories like `ComfyUI_frontend/`)
- Uses conditional caching to avoid redundant browser installations

## Benefits
- Reduces code duplication across 6 workflow files
- Centralizes Playwright caching logic  
- Consistent browser setup across all workflows
- Easier maintenance and updates
- Faster CI runs through intelligent caching

## Affected Workflows
- `.github/workflows/test-ui.yaml` (2 uses)
- `.github/workflows/i18n-custom-nodes.yaml`
- `.github/workflows/i18n-node-defs.yaml`
- `.github/workflows/i18n.yaml`
- `.github/workflows/test-browser-exp.yaml`

---------

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
snomiao
2025-10-02 14:20:48 +09:00
committed by GitHub
parent d0e81cdd33
commit c662c77305
7 changed files with 45 additions and 68 deletions

View File

@@ -902,7 +902,7 @@ export class LGraphNode
if (this.onSerialize?.(o))
console.warn(
'node onSerialize shouldn\'t return anything, data should be stored in the object pass in the first parameter'
"node onSerialize shouldn't return anything, data should be stored in the object pass in the first parameter"
)
return o