mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 15:54:09 +00:00
This pull request significantly refactors the Playwright expectations update workflow to improve reliability, efficiency, and maintainability. The workflow is now split into three coordinated jobs—setup, sharded snapshot updates, and merge/commit—enabling parallel test execution and artifact management. Key improvements include sharding Playwright snapshot updates, robust caching and artifact handling, and more reliable PR context handling. **Workflow Restructuring and Sharding:** * The workflow is split into three jobs: `setup` (prepares environment and caches it), `update-snapshots-sharded` (runs Playwright snapshot updates in four parallel shards), and `merge-and-commit` (merges results and commits updates). This enables faster, more reliable snapshot updates. [[1]](diffhunk://#diff-0289f4b5962314fa2d58937651c3d2a0f2c6f76e26c95d6a04d43c18b3449917L15-R15) [[2]](diffhunk://#diff-0289f4b5962314fa2d58937651c3d2a0f2c6f76e26c95d6a04d43c18b3449917R27-R175) **Caching and Artifact Management:** * The setup job builds and caches the entire workspace, which is then restored by each shard for consistent environments. Each shard uploads its updated snapshots and test reports as artifacts, which are later downloaded and merged in the final job. **Improved PR Context Handling:** * PR number, branch, and comment IDs are now reliably extracted and passed between jobs using outputs, ensuring correct association with the PR throughout the workflow (e.g., for commenting, reactions, and pushing updates). [[1]](diffhunk://#diff-0289f4b5962314fa2d58937651c3d2a0f2c6f76e26c95d6a04d43c18b3449917R27-R175) [[2]](diffhunk://#diff-0289f4b5962314fa2d58937651c3d2a0f2c6f76e26c95d6a04d43c18b3449917L92-R199) **Job and Step Renaming/Cleanup:** * The main job is renamed from `test` to `setup`, and redundant or unnecessary steps (such as the old branch SHA extraction) are removed for clarity and maintainability. [[1]](diffhunk://#diff-0289f4b5962314fa2d58937651c3d2a0f2c6f76e26c95d6a04d43c18b3449917L15-R15) [[2]](diffhunk://#diff-0289f4b5962314fa2d58937651c3d2a0f2c6f76e26c95d6a04d43c18b3449917R27-R175) **Comment and Label Automation Improvements:** * Automated GitHub comment reactions and label removals now use the correct PR context, ensuring that feedback and status updates are reliably posted to the right place. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6100-Shard-Update-Test-Expectations-PR-28f6d73d36508109bcd8d382c942d44d) by [Unito](https://www.unito.io) --------- Co-authored-by: sno <snomiao@gmail.com>