-
Notifications
You must be signed in to change notification settings - Fork 377
refactor: Reorganize GitHub Actions for better reusability #5949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This refactoring improves the CI/CD workflow structure by: - Split the monolithic setup-frontend action into two focused actions: - setup-frontend: Now only handles frontend dependency installation and building - setup-comfyui-server: New action for ComfyUI server setup and launch - Simplified workflow structure with better separation of concerns: - Frontend and server setup are now independent and reusable - Each action has clearer responsibilities and inputs - Removed duplicate setup code across workflows - Improved tests-ci.yaml workflow: - Uses cache/save and cache/restore for the entire workspace - Test jobs now restore cached build instead of rebuilding - Reduced redundant setup steps in each test shard - Better parallelization with faster test execution - Updated all locale update workflows to use new action structure - Made setup-playwright a standalone reusable action Benefits: - Faster CI runs by reducing redundant builds - More maintainable with DRY principle - Easier to debug individual components - Better action reusability across workflows
🎭 Playwright Test Results⏰ Completed at: 10/07/2025, 05:58:40 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 10/07/2025, 05:34:48 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
path: | | ||
./.cache | ||
./tsconfig.tsbuildinfo | ||
key: playwright-setup-cache-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}-${{ hashFiles('./src/**/*.{ts,vue,js}', './*.config.*') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would invalidate practically every run, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I have to check what's included in .cache now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrated to frontend build action
The PLAYWRIGHT_BLOB_OUTPUT_DIR was set to ../blob-report which was correct when working-directory was ComfyUI_frontend, but now that we removed the working-directory, the path should be ./blob-report to output in the repo root.
Fix AppliedFixed the failing job. The issue was with the blob report output path. ProblemWhen removing the SolutionChanged The workflow is now running again with this fix applied. |
Add helpful error message when cp fails to copy devtools files. This clarifies the requirement that the frontend repo must be checked out before using this action.
Changes: - Move cache restore to setup-frontend action BEFORE build operations - Remove duplicate cache step from setup-playwright action - Use cache/restore instead of cache to avoid auto-save behavior - Rename cache key from 'playwright-setup-cache' to 'tool-cache' for clarity - Include source file hashes in cache key for proper invalidation Benefits: - Cache is now restored before tools run, allowing them to use cached data - Eliminates duplicate caching of ./.cache directory - Cache properly invalidates when source files or configs change - Follows GitHub Actions best practice of restore before, save after pattern - The workspace cache in tests-ci.yaml handles saving the complete state Note: The .cache directory contains outputs from ESLint, Prettier, Stylelint, Knip, and TypeScript incremental builds. These should be restored before any build/lint operations run.
Response to cache invalidation concernI've refactored the Changes Made
Why This Works BetterCache invalidation is now appropriate:
What's cached:
In
This approach is more efficient and follows GitHub Actions best practices for cache lifecycle management. |
shell: bash | ||
run: | | ||
mkdir -p ComfyUI/custom_nodes/ComfyUI_devtools | ||
if ! cp -r ./tools/devtools/* ComfyUI/custom_nodes/ComfyUI_devtools/; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this means the frontend isn't under ComfyUI_frontend/ComfyUI_frontend/
anymore? 😁
This makes me happy.
pip install wait-for-it | ||
working-directory: ComfyUI | ||
|
||
build_frontend: 'false' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick check: When we invoke this, is build_frontend
set to false or true more often?
If it's turned off explicitly more often than left on by default, can we flip the default to make building opt-in instead of opt-out?
I usually prefer being able to find the heavier uses by searching for when options are turned on.
Keep in mind, we've started moving some components of the codebase into packages, so not everything that impacts the build is under |
Summary
This PR refactors the GitHub Actions workflow structure to improve reusability, maintainability, and CI performance.
Changes
New Actions
Refactored Actions
Workflow Improvements
tests-ci.yaml
Locale Update Workflows
update-locales.yaml
to use the new action structureupdate-locales-for-given-custom-node-repository.yaml
with proper custom node installationupdate-node-definitions-locales.yaml
to use new actionsworking-directory
references where appropriateOther Workflows
update-playwright-expectations.yaml
to use new action structureBenefits
Testing
Related Issues
This refactoring addresses workflow complexity and reduces CI runtime by leveraging GitHub Actions caching more effectively.
┆Issue is synchronized with this Notion page by Unito