mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
## Summary - Adds a local composite action at `.github/actions/setup-frontend` to replace the external `Comfy-Org/ComfyUI_frontend_setup_action` - Follows the same pattern as PR #5754 (sno-playwright-composite-action) for consistency - Updates workflows to use the new local composite action ## Motivation Similar to the Playwright composite action, this change: - Reduces external dependencies on separate action repositories - Provides better control over versioning and updates - Maintains consistency with other composite actions in the repository - Simplifies maintenance by keeping all CI/CD logic in one place ## Changes ### New composite action: `.github/actions/setup-frontend/action.yml` Direct mirror of the external action with the same 2 inputs: - `extra_server_params`: Additional parameters to pass to ComfyUI server - `devtools_ref`: Reference to use for ComfyUI_devtools The action: 1. Checks out ComfyUI, ComfyUI_frontend, and ComfyUI_devtools 2. Sets up pnpm, Node.js (LTS), and Python (3.10) 3. Installs all dependencies (Python packages, npm packages) 4. Builds the frontend 5. Starts the ComfyUI server with the built frontend ### Updated workflows: - `.github/workflows/i18n.yaml` - `.github/workflows/i18n-node-defs.yaml` - `.github/workflows/test-browser-exp.yaml` All workflows now use the local composite action instead of `Comfy-Org/ComfyUI_frontend_setup_action@v3` ## Test plan - [ ] Verify all updated workflows pass CI tests - [ ] Confirm the composite action works in all scenarios - [ ] Check that build and server startup work as expected ## Related PRs - #5754 - Similar approach for Playwright composite action 🤖 Generated with [Claude Code](https://claude.ai/code)
51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
# Setting test expectation screenshots for Playwright
|
|
name: Update Playwright Expectations
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ labeled ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.label.name == 'New Browser Test Expectations'
|
|
steps:
|
|
- name: Setup Frontend
|
|
uses: ./.github/actions/setup-frontend
|
|
- 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: pnpm exec playwright install chromium --with-deps
|
|
working-directory: ComfyUI_frontend
|
|
- name: Run Playwright tests and update snapshots
|
|
id: playwright-tests
|
|
run: pnpm exec playwright test --update-snapshots
|
|
continue-on-error: true
|
|
working-directory: ComfyUI_frontend
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: ComfyUI_frontend/playwright-report/
|
|
retention-days: 30
|
|
- name: Debugging info
|
|
run: |
|
|
echo "Branch: ${{ github.head_ref }}"
|
|
git status
|
|
working-directory: ComfyUI_frontend
|
|
- name: Commit updated expectations
|
|
run: |
|
|
git config --global user.name 'github-actions'
|
|
git config --global user.email 'github-actions@github.com'
|
|
git fetch origin ${{ github.head_ref }}
|
|
git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }}
|
|
git add browser_tests
|
|
git commit -m "Update test expectations [skip ci]"
|
|
git push origin HEAD:${{ github.head_ref }}
|
|
working-directory: ComfyUI_frontend
|