Compare commits

...

33 Commits

Author SHA1 Message Date
snomiao
2e6bf4896e [feat] Add comprehensive caching to CI/CD workflows
- Add ESLint cache (.eslintcache) to auto-fix and fork PR workflows
- Add npm cache to all Node.js setup steps across workflows
- Add Vite build cache (node_modules/.vite) to improve build performance
- Add Playwright browser cache with version-specific keys
- Optimize test-ui, vitest, release, and auto-fix workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 13:45:29 +00:00
snomiao
b87a251e6b fix: Replace manual workflow setup with Comfy-Org setup action for Playwright tests
- Use Comfy-Org/ComfyUI_frontend_setup_action@v2.3 instead of manual Node.js setup
- Add working-directory: ComfyUI_frontend to all workflow steps
- Use original i18n workflow commit strategy instead of stefanzweifel/git-auto-commit-action
- Remove test code that was triggering workflow failures
- This fixes the Playwright test failures by properly setting up ComfyUI backend

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 12:51:40 +00:00
snomiao
1aa2a66b01 fix: Replace raw text with i18n translation key to test workflow 2025-08-14 11:59:34 +00:00
snomiao
253853be6f kick-format 2025-08-14 11:53:49 +00:00
snomiao
7f86f3fec1 e Merge branch 'sno-lint-issue-write--merge-with-locales-update' of github.com:Comfy-Org/ComfyUI_frontend into sno-lint-issue-write--merge-with-locales-update 2025-08-14 11:48:14 +00:00
snomiao
9a381415e5 chore(auto-fix-and-update.yaml): update comments to clarify job purposes and actions for better understanding 2025-08-14 11:48:09 +00:00
snomiao
b61ecef7fd [auto-fix] Apply ESLint and Prettier fixe 2025-08-14 11:43:04 +00:00
snomiao
aab6c0c954 kick-format-modify-main-ts 2025-08-14 11:42:47 +00:00
snomiao
8afc0b9012 kick-format 2025-08-14 11:42:47 +00:00
snomiao
3a869d98da Merge branch 'sno-lint-issue-write--merge-with-locales-update' of github.com:Comfy-Org/ComfyUI_frontend into sno-lint-issue-write--merge-with-locales-update 2025-08-14 11:41:24 +00:00
snomiao
3021b60dc4 [feat] Merge commit-back workflows into unified auto-fix-and-update workflow
- Combines lint-and-format and locale update workflows to avoid git conflicts
- Uses stefanzweifel/git-auto-commit-action@v5 for reliable commits
- Includes proper permissions (contents: write, pull-requests: write, issues: write)
- Handles both main repo PRs (with auto-commit) and fork PRs (with guidance comments)
- Updates locales only when relevant code changes are detected
- Single commit strategy prevents conflicts between different auto-fix operations

Resolves conflicts mentioned in PR #4940 comments where multiple commit-back
workflows would interfere with each other.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 11:39:48 +00:00
snomiao
1643baf761 feat: Add issues write permission to workflows to avoid lint and i18n workflow conflicts
- Add issues: write permission to lint-and-format.yaml
- Add issues: write permission to i18n.yaml
- Prevents workflow conflicts when updating PR statuses or comments
2025-08-14 11:39:48 +00:00
snomiao
8d4846770f [auto-fix] Apply ESLint and Prettier fixe 2025-08-14 11:39:48 +00:00
snomiao
a88d46bdb7 use auto-commit-action to handle pullrequest-ref name 2025-08-14 11:39:48 +00:00
snomiao
39686ef0f6 kick-format-modify-main-ts 2025-08-14 11:39:48 +00:00
snomiao
943359e559 kick-format 2025-08-14 11:39:48 +00:00
snomiao
a7dd696cbe [feat] Add issues: write permission to lint-and-format workflow
The lint-and-format workflow creates comments on PRs, which requires
the issues: write permission to function properly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 11:39:48 +00:00
snomiao
405b97c5ef [feat] Merge commit-back workflows into unified auto-fix-and-update workflow
- Combines lint-and-format and locale update workflows to avoid git conflicts
- Uses stefanzweifel/git-auto-commit-action@v5 for reliable commits
- Includes proper permissions (contents: write, pull-requests: write, issues: write)
- Handles both main repo PRs (with auto-commit) and fork PRs (with guidance comments)
- Updates locales only when relevant code changes are detected
- Single commit strategy prevents conflicts between different auto-fix operations

Resolves conflicts mentioned in PR #4940 comments where multiple commit-back
workflows would interfere with each other.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 10:47:03 +00:00
Alexander Piskun
e27b44bdac fix pricing for KlingImage2VideoNode (#4957)
## Summary

Following up #4938 where I forgot to add pricing for new model in the
`KlingImage2VideoNode`.

## Screenshots (if applicable)

<img width="1461" height="1228" alt="Screenshot from 2025-08-13
09-15-21"
src="https://github.com/user-attachments/assets/01be8ab9-820b-4112-9a54-1ce4f23de4eb"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4957-fix-pricing-for-KlingImage2VideoNode-24e6d73d36508122b40ede36fdd50115)
by [Unito](https://www.unito.io)
2025-08-14 10:45:33 +00:00
Christian Byrne
01a0ebc8c8 [feat] Restore group node conversion menu with deprecated label (#4967)
## Summary
- Partially reverts commit c84218d6 to restore group node functionality
in context menus
- Adds "(Deprecated)" label to indicate the feature is deprecated
- Fixes TypeError when right-clicking on group nodes
- Re-enables tests that were disabled when the feature was removed

## Changes
1. **Restored context menu options** - Added back "Convert to Group Node
(Deprecated)" and "Manage Group Nodes" menu items
2. **Fixed null reference error** - Added null-safe operator to prevent
errors when right-clicking group nodes
3. **Re-enabled tests** - Restored 7 tests that were disabled in commit
586f8824

## Test plan
- [x] Right-click on canvas → verify "Convert to Group Node
(Deprecated)" appears
- [x] Right-click on nodes → verify the same menu option appears
- [x] Select multiple nodes and use the menu option → verify conversion
works
- [x] Right-click on group nodes → verify no errors occur
- [x] Run browser tests → verify all re-enabled tests pass

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4967-feat-Restore-group-node-conversion-menu-with-deprecated-label-24e6d73d36508149a6f2dbef47223e94)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions <github-actions@github.com>
2025-08-14 10:45:33 +00:00
Christian Byrne
cd970bd29d fix: Add guards for _listenerController.abort() calls in SubgraphNode (#4968)
This fix adds guards before calling `_listenerController.abort()` to
prevent runtime errors when loading workflows. The guards check that
`_listenerController` exists and has an `abort` function before calling
it, matching the pattern used in Comfy-Org/litegraph.js#1134.

Fixes https://github.com/Comfy-Org/ComfyUI_frontend/issues/4907

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4968-fix-Add-guards-for-_listenerController-abort-calls-in-SubgraphNode-24e6d73d3650813ebeeed69ee676faeb)
by [Unito](https://www.unito.io)
2025-08-14 10:45:33 +00:00
Terry Jia
ad7d23177e show group self color in minimap (#4954)
a tiny fix that show group self color in minimap when checking node
color

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4954-show-group-self-color-in-minimap-24e6d73d3650812dbc58e9b134805f2d)
by [Unito](https://www.unito.io)
2025-08-14 10:45:32 +00:00
AustinMroz
ccaeab1541 Bundled subgraph fixes (#4964)
### Group support for subgraph unpacking
The unpacking code would silently delete groups (the cosmetic colored
rectangles). They are now correctly transferred.
### Fix subgraph node position on conversion to subgraph
Converting to subgraph will no longer cause nodes to inch upwards

![subgraph-conversion-positioning](https://github.com/user-attachments/assets/e120c3f9-5602-4dba-9075-c1eadb534f9a)
### Make unpacking use same positioning calcs as conversion
Non trivial, but unpacking is now a proper inverse for conversion.

![subgraph-conversion-inverse](https://github.com/user-attachments/assets/4fcaffca-1c97-4d71-93f7-1af569b1c941)
### Clean up old output links when unpacking
Unpacked nodes were left with dangling outputs. This would cause
cascading issues later, such as when consecutively unpacking nested
subgraphs.
### Minor refactoring for code clarity

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4964-Bundled-subgraph-fixes-24e6d73d365081d3a043ef1531d9d38a)
by [Unito](https://www.unito.io)
2025-08-14 10:45:32 +00:00
pythongosssss
3024dcc41b Update side toolbar menu (#4946)
Side toolbar menu UI updates

## Summary

- Currently the template modal is very hidden. Many users do not find it
- The current icons are quite aleatory 

## Changes

 **What**: 
- Add templates shortcut button
- Add item label in normal size
- Use custom icon

Critical design decisions or edge cases that need attention:
- Sidebar tabs registered using custom icons will have their associated
command registed with an undefined icon (currently only string icons are
accepted, not components). I couldn't see anywhere directly using this
icon, but we should consider autogenerating an icon font so we can use
classes for our custom icons (or locating and updating locations to
support both icon types)

## Screenshots (if applicable)
Normal mode:
<img width="621" height="1034" alt="image"
src="https://github.com/user-attachments/assets/c1d1cee2-004e-4ff8-b3fa-197329b0d2ae"
/>

Small mode:
<img width="176" height="325" alt="image"
src="https://github.com/user-attachments/assets/3824b8f6-bc96-4e62-aece-f0265113d2e3"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4946-Update-side-toolbar-menu-24d6d73d365081c5b2bdc0ee8b61dc50)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-08-14 10:45:32 +00:00
snomiao
c5581c9393 [feat] Add alternative package manager lockfiles to .gitignore (#4961)
## Summary
- Add bun.lock, bun.lockb, pnpm-lock.yaml, and yarn.lock to .gitignore
- Allows users to use faster package managers (Bun, pnpm) without making
git status dirty
- Maintains npm as the default while supporting developer choice of
package manager

## Test plan
- [x] Verify .gitignore changes are correct
- [ ] Test that creating these lockfiles doesn't show in git status
- [ ] Confirm existing npm functionality remains unaffected

🤖 Generated with [Claude Code](https://claude.ai/code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4961-feat-Add-alternative-package-manager-lockfiles-to-gitignore-24e6d73d3650817c8fa4fb8e94df5ac6)
by [Unito](https://www.unito.io)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-14 10:45:32 +00:00
snomiao
fe0054d9dd [feat] Add Linux core dump to .gitignore (#4960)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions <github-actions@github.com>
2025-08-14 10:45:32 +00:00
snomiao
b4bf72b2b7 Merge branch 'main' into sno-lint-issue-write 2025-08-13 15:56:38 +09:00
snomiao
45b43aa093 feat: Add issues write permission to workflows to avoid lint and i18n workflow conflicts
- Add issues: write permission to lint-and-format.yaml
- Add issues: write permission to i18n.yaml
- Prevents workflow conflicts when updating PR statuses or comments
2025-08-13 06:50:54 +00:00
snomiao
ec2888a116 [auto-fix] Apply ESLint and Prettier fixe 2025-08-13 05:25:41 +00:00
snomiao
0f747f3c5d use auto-commit-action to handle pullrequest-ref name 2025-08-13 05:21:29 +00:00
snomiao
7ee33e2892 kick-format-modify-main-ts 2025-08-12 11:52:25 +00:00
snomiao
73f71fc018 kick-format 2025-08-12 11:48:32 +00:00
snomiao
6b085ea8c4 [feat] Add issues: write permission to lint-and-format workflow
The lint-and-format workflow creates comments on PRs, which requires
the issues: write permission to function properly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 06:49:15 +00:00
6 changed files with 250 additions and 134 deletions

View File

@@ -0,0 +1,206 @@
name: Auto-fix and Update
on:
pull_request:
branches-ignore: [wip/*, draft/*, temp/*]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
auto-fix-and-update:
# Only run on PRs from the same repository (not forks) to avoid permission issues, auto fix any lint and formats, update locales, and commit the changes back
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- name: Setup ComfyUI Frontend and Backend
uses: Comfy-Org/ComfyUI_frontend_setup_action@v2.3
# Step 1: Cache ESLint for better performance
- name: Cache ESLint
uses: actions/cache@v4
with:
path: ComfyUI_frontend/.eslintcache
key: ${{ runner.os }}-eslint-${{ hashFiles('ComfyUI_frontend/eslint.config.js', 'ComfyUI_frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-eslint-
# Step 2: Run lint and format fixes
- name: Run ESLint with auto-fix
run: npm run lint:fix
working-directory: ComfyUI_frontend
- name: Run Prettier with auto-format
run: npm run format
working-directory: ComfyUI_frontend
# Step 3: Update locales (only if there are relevant changes)
- name: Check if locale updates needed
id: check-locale-changes
run: |
# Check if there are changes to files that would affect locales
if git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -E '\.(vue|ts|tsx)$' | grep -v test | head -1; then
echo "locale_updates_needed=true" >> $GITHUB_OUTPUT
else
echo "locale_updates_needed=false" >> $GITHUB_OUTPUT
fi
working-directory: ComfyUI_frontend
- name: Install Playwright Browsers
if: steps.check-locale-changes.outputs.locale_updates_needed == 'true'
run: npx playwright install chromium --with-deps
working-directory: ComfyUI_frontend
- name: Start dev server
if: steps.check-locale-changes.outputs.locale_updates_needed == 'true'
run: npm run dev:electron &
working-directory: ComfyUI_frontend
- name: Update en.json
if: steps.check-locale-changes.outputs.locale_updates_needed == 'true'
run: npm run collect-i18n -- scripts/collect-i18n-general.ts
env:
PLAYWRIGHT_TEST_URL: http://localhost:5173
working-directory: ComfyUI_frontend
- name: Update translations
if: steps.check-locale-changes.outputs.locale_updates_needed == 'true'
run: npm run locale
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
working-directory: ComfyUI_frontend
# Step 4: Check for any changes from both lint-format and locale updates
- name: Check for changes
id: verify-changed-files
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
# Show what changed for debugging
echo "Changed files:"
git status --porcelain
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
working-directory: ComfyUI_frontend
# Step 5: Commit all changes in a single commit
- name: Commit auto-fixes and locale updates
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git fetch origin ${{ github.head_ref }}
# Stash any local changes before checkout
git stash -u
git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }}
# Apply the stashed changes if any
git stash pop || true
git add .
git diff --staged --quiet || git commit -m "[auto-fix] Apply ESLint, Prettier fixes and update locales"
git push origin HEAD:${{ github.head_ref }}
working-directory: ComfyUI_frontend
# Step 6: Run final validation
- name: Final validation
run: |
npm run lint
npm run format:check
npm run knip
working-directory: ComfyUI_frontend
# Step 7: Comment on PR about what was fixed
- name: Comment on PR about auto-fixes
if: steps.verify-changed-files.outputs.changed == 'true'
uses: actions/github-script@v7
with:
script: |
let changes = [];
if ('${{ steps.check-locale-changes.outputs.locale_updates_needed }}' === 'true') {
changes.push('Locale updates');
}
// Always include lint/format as we ran them
changes.push('ESLint auto-fixes', 'Prettier formatting');
const changesText = changes.join('\n- ');
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `## 🔧 Auto-fixes Applied
This PR has been automatically updated with the following changes:
- ${changesText}
**⚠️ Important**: Your local branch is now behind. Run \`git pull\` before making additional changes to avoid conflicts.`
});
# Separate job for fork PRs that can't auto-commit, we only check lint and formats, and do not commit back
fork-pr-check:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Cache ESLint
uses: actions/cache@v4
with:
path: .eslintcache
key: ${{ runner.os }}-eslint-fork-${{ hashFiles('eslint.config.js', 'package-lock.json') }}
restore-keys: |
${{ runner.os }}-eslint-fork-
- name: Check linting and formatting
id: check-lint-format
run: |
# Run checks and capture exit codes
npm run lint || echo "lint_failed=true" >> $GITHUB_OUTPUT
npm run format:check || echo "format_failed=true" >> $GITHUB_OUTPUT
npm run knip || echo "knip_failed=true" >> $GITHUB_OUTPUT
- name: Comment on fork PR about manual fixes needed
if: steps.check-lint-format.outputs.lint_failed == 'true' || steps.check-lint-format.outputs.format_failed == 'true' || steps.check-lint-format.outputs.knip_failed == 'true'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `## ⚠️ Linting/Formatting Issues Found
This PR has linting or formatting issues that need to be fixed.
**Since this PR is from a fork, auto-fix cannot be applied automatically.**
### Option 1: Set up pre-commit hooks (recommended)
Run this once to automatically format code on every commit:
\`\`\`bash
npm run prepare
\`\`\`
### Option 2: Fix manually
Run these commands and push the changes:
\`\`\`bash
npm run lint:fix
npm run format
\`\`\`
See [CONTRIBUTING.md](https://github.com/Comfy-Org/ComfyUI_frontend/blob/main/CONTRIBUTING.md#git-pre-commit-hooks) for more details.`
});

View File

@@ -1,51 +0,0 @@
name: Update Locales
on:
pull_request:
branches: [ main, master, dev* ]
paths-ignore:
- '.github/**'
- '.husky/**'
- '.vscode/**'
- 'browser_tests/**'
- 'tests-ui/**'
jobs:
update-locales:
# Don't run on fork PRs
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v2.3
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
working-directory: ComfyUI_frontend
- name: Start dev server
# Run electron dev server as it is a superset of the web dev server
# We do want electron specific UIs to be translated.
run: npm run dev:electron &
working-directory: ComfyUI_frontend
- name: Update en.json
run: npm run collect-i18n -- scripts/collect-i18n-general.ts
env:
PLAYWRIGHT_TEST_URL: http://localhost:5173
working-directory: ComfyUI_frontend
- name: Update translations
run: npm run locale
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
working-directory: ComfyUI_frontend
- name: Commit updated locales
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git fetch origin ${{ github.head_ref }}
# Stash any local changes before checkout
git stash -u
git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }}
# Apply the stashed changes if any
git stash pop || true
git add src/locales/
git diff --staged --quiet || git commit -m "Update locales [skip ci]"
git push origin HEAD:${{ github.head_ref }}
working-directory: ComfyUI_frontend

View File

@@ -1,83 +0,0 @@
name: Lint and Format
on:
pull_request:
branches-ignore: [wip/*, draft/*, temp/*]
permissions:
contents: write
pull-requests: write
jobs:
lint-and-format:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run ESLint with auto-fix
run: npm run lint:fix
- name: Run Prettier with auto-format
run: npm run format
- name: Check for changes
id: verify-changed-files
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Commit changes
if: steps.verify-changed-files.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "[auto-fix] Apply ESLint and Prettier fixes"
git push
- name: Final validation
run: |
npm run lint
npm run format:check
npm run knip
- name: Comment on PR about auto-fix
if: steps.verify-changed-files.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '## 🔧 Auto-fixes Applied\n\nThis PR has been automatically updated to fix linting and formatting issues.\n\n**⚠️ Important**: Your local branch is now behind. Run `git pull` before making additional changes to avoid conflicts.\n\n### Changes made:\n- ESLint auto-fixes\n- Prettier formatting'
})
- name: Comment on PR about manual fix needed
if: steps.verify-changed-files.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name != github.repository
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '## ⚠️ Linting/Formatting Issues Found\n\nThis PR has linting or formatting issues that need to be fixed.\n\n**Since this PR is from a fork, auto-fix cannot be applied automatically.**\n\n### Option 1: Set up pre-commit hooks (recommended)\nRun this once to automatically format code on every commit:\n```bash\nnpm run prepare\n```\n\n### Option 2: Fix manually\nRun these commands and push the changes:\n```bash\nnpm run lint:fix\nnpm run format\n```\n\nSee [CONTRIBUTING.md](https://github.com/Comfy-Org/ComfyUI_frontend/blob/main/CONTRIBUTING.md#git-pre-commit-hooks) for more details.'
})

View File

@@ -22,6 +22,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Get current version
id: current_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
@@ -34,6 +35,13 @@ jobs:
else
echo "is_prerelease=false" >> $GITHUB_OUTPUT
fi
- name: Cache Vite build
uses: actions/cache@v4
with:
path: node_modules/.vite
key: ${{ runner.os }}-vite-release-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-vite-release-
- name: Build project
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
@@ -117,6 +125,7 @@ jobs:
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org
cache: 'npm'
- run: npm ci
- run: npm run build:types
- name: Publish package

View File

@@ -35,6 +35,16 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
cache-dependency-path: ComfyUI_frontend/package-lock.json
- name: Cache Vite build
uses: actions/cache@v4
with:
path: ComfyUI_frontend/node_modules/.vite
key: ${{ runner.os }}-vite-build-${{ hashFiles('ComfyUI_frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-vite-build-
- name: Build ComfyUI_frontend
run: |
@@ -92,7 +102,23 @@ jobs:
wait-for-it --service 127.0.0.1:8188 -t 600
working-directory: ComfyUI
- name: Get Playwright version
id: playwright-version
run: echo "version=$(npm list @playwright/test --depth=0 --json | jq -r '.dependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
working-directory: ComfyUI_frontend
- name: Cache Playwright browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}-chromium
restore-keys: |
${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}-
${{ runner.os }}-playwright-
- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install chromium --with-deps
working-directory: ComfyUI_frontend

View File

@@ -17,10 +17,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Cache Vite
uses: actions/cache@v4
with:
path: node_modules/.vite
key: ${{ runner.os }}-vite-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-vite-
- name: Run Vitest tests
run: |
npm run test:component