ci: cache e2e setup and reuse dist (#7)

* chore: align local CI workflow

* ci: cache e2e setup and reuse dist
This commit is contained in:
PBandDev
2026-03-24 12:40:28 -05:00
committed by GitHub
parent 7ed543c59e
commit c950a3a274
9 changed files with 51 additions and 15 deletions
+27 -4
View File
@@ -2,7 +2,7 @@ name: CI
on:
push:
branches: [main, v2]
branches: [main]
pull_request:
branches: [main]
@@ -35,6 +35,12 @@ jobs:
- name: Build
run: pnpm build
- name: Cache built extension
uses: actions/cache@v4
with:
path: dist/index.js
key: ${{ runner.os }}-dist-${{ github.sha }}
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
@@ -55,14 +61,31 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Restore built extension
uses: actions/cache@v4
with:
path: dist/index.js
key: ${{ runner.os }}-dist-${{ github.sha }}
- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright browsers
run: pnpx playwright install chromium --with-deps
- name: Build extension
run: pnpm build
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Cache test ComfyUI environment
uses: actions/cache@v4
with:
path: .test-comfy
key: ${{ runner.os }}-test-comfy-${{ hashFiles('.python-version', 'e2e.config.ts', 'scripts/setup-test-comfy.ts', 'scripts/setup-test-comfy-helpers.ts') }}
- name: Setup test ComfyUI
run: pnpm setup:e2e
+12
View File
@@ -56,9 +56,21 @@ jobs:
- name: Build
run: pnpm build
- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright browsers
run: pnpx playwright install chromium --with-deps
- name: Cache test ComfyUI environment
uses: actions/cache@v4
with:
path: .test-comfy
key: ${{ runner.os }}-test-comfy-${{ hashFiles('.python-version', 'e2e.config.ts', 'scripts/setup-test-comfy.ts', 'scripts/setup-test-comfy-helpers.ts') }}
- name: Setup test ComfyUI
run: pnpm setup:e2e
timeout-minutes: 15
+2 -2
View File
@@ -53,9 +53,9 @@ Version bumping:
- Installed `comfyui-workflow-templates` are discovered live at E2E runtime from the pinned test ComfyUI environment.
- Broad installed-template coverage asserts correctness invariants only; strict topological order remains repo-fixture-only.
- Visual regression is graph-canvas scoped and uses platform-specific `-win32` / `-linux` baselines.
- `pnpm ci:local` covers unit/build parity only.
- `pnpm ci:local` runs the full local CI workflow with `act`.
## Known Friction
- Some real ComfyUI workflows load with imperfect group rectangles. Verify against live runtime before changing containment behavior.
- A small number of real installed templates have topological-order violations due to complex inter-group connections. Tracked for v2.1.
- A small number of real installed templates have topological-order violations due to complex inter-group connections. Tracked for a future minor release.
+1 -3
View File
@@ -62,9 +62,7 @@ Visual regression baselines are platform-specific: committed snapshots use `-win
Install [act](https://github.com/nektos/act) and Docker, then run:
- `pnpm ci:local` runs the unit-test and build workflow inside a local container
E2E tests still require the normal local ComfyUI provisioning flow and are not part of the `act` path yet.
- `pnpm ci:local` runs the full local CI workflow with `act`
## Release
+1 -1
View File
@@ -13,7 +13,7 @@
"test:coverage": "vitest run --coverage",
"setup:e2e": "tsx scripts/setup-test-comfy.ts",
"test:e2e": "playwright test",
"ci:local": "act push --workflows .github/workflows/ci.yaml -j unit-tests"
"ci:local": "act push --workflows .github/workflows/ci.yaml"
},
"keywords": [
"comfyui",
+4 -1
View File
@@ -8,7 +8,10 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 8,
reporter: "html",
reporter: [
["line"],
["html", { open: "never" }],
],
use: {
baseURL: e2eConfig.comfyUrl,
trace: "on-first-retry",
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Core layout framework — recursive group-aware layout orchestration.
*
* This is the architectural foundation of v2. It handles:
* This is the architectural foundation of the current layout system. It handles:
* - Bottom-up group hierarchy processing
* - Delegating to a pluggable LayoutAlgorithm
* - Disconnected node placement (left of DAG at each level)
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Pure layout types — no ComfyUI/LGraph dependencies.
* These are the abstract types for the v2 layout framework.
* These are the abstract types for the layout framework.
*/
/** Position as a simple object */
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* Regression tests for v1 bugs that must not recur in v2.
* Regression tests for legacy bugs that must not recur.
*
* Each test targets a specific issue from the v1 changeset history:
* - 0006: Y explosion (groups centering against tallest layer)
@@ -20,7 +20,7 @@ import {
} from "./helpers";
import { loadFixture } from "./fixtures";
test.describe("Regression: v1 bug fixes", () => {
test.describe("Regression: legacy bug fixes", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/");
await waitForComfyUI(page);