From 72e3d963275c5e2f3df15d1c78e562069b009665 Mon Sep 17 00:00:00 2001 From: snomiao Date: Sun, 31 Aug 2025 05:55:33 +0000 Subject: [PATCH] feat: Enhance Playwright browser caching and CI/CD conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Playwright browser caching to i18n-custom-nodes and i18n-node-defs workflows - Update test-ui.yaml to allow running from feat/add-playwright-browser-caching* branches - Remove sno-playwright-* from branches-ignore to enable CI for review branches - Ensure consistent caching strategy across all Playwright workflows This improves CI performance by avoiding repeated browser downloads and enables testing from feature branches during development and review. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/i18n-custom-nodes.yaml | 7 +++++++ .github/workflows/i18n-node-defs.yaml | 7 +++++++ .github/workflows/test-ui.yaml | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/i18n-custom-nodes.yaml b/.github/workflows/i18n-custom-nodes.yaml index a5617c1964..5189307a79 100644 --- a/.github/workflows/i18n-custom-nodes.yaml +++ b/.github/workflows/i18n-custom-nodes.yaml @@ -78,6 +78,13 @@ jobs: python main.py --cpu --multi-user & wait-for-it --service 127.0.0.1:8188 -t 600 working-directory: ComfyUI + - name: Cache Playwright browsers + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-browsers-${{ runner.os }}-${{ hashFiles('ComfyUI_frontend/pnpm-lock.yaml') }} + restore-keys: | + playwright-browsers-${{ runner.os }}- - name: Install Playwright Browsers run: npx playwright install chromium --with-deps working-directory: ComfyUI_frontend diff --git a/.github/workflows/i18n-node-defs.yaml b/.github/workflows/i18n-node-defs.yaml index 1327db3cf7..d3b97bd0a2 100644 --- a/.github/workflows/i18n-node-defs.yaml +++ b/.github/workflows/i18n-node-defs.yaml @@ -14,6 +14,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: Comfy-Org/ComfyUI_frontend_setup_action@v3 + - name: Cache Playwright browsers + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-browsers-${{ runner.os }}-${{ hashFiles('ComfyUI_frontend/pnpm-lock.yaml') }} + restore-keys: | + playwright-browsers-${{ runner.os }}- - name: Install Playwright Browsers run: npx playwright install chromium --with-deps working-directory: ComfyUI_frontend diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml index 99b3727ce4..aefca29b13 100644 --- a/.github/workflows/test-ui.yaml +++ b/.github/workflows/test-ui.yaml @@ -2,10 +2,10 @@ name: Tests CI on: push: - branches: [main, master, core/*, desktop/*] + branches: [main, master, core/*, desktop/*, feat/add-playwright-browser-caching*] pull_request: branches-ignore: - [wip/*, draft/*, temp/*, vue-nodes-migration, sno-playwright-*] + [wip/*, draft/*, temp/*, vue-nodes-migration] jobs: setup: