[CI] Update workflow names & add descriptions (#694)

- Adds descriptions to workflows
- Auto-formats workflows
- Standardises formatting
This commit is contained in:
filtered
2025-03-03 20:35:06 +11:00
committed by GitHub
parent c128551af5
commit 1b10b0b0b6
4 changed files with 106 additions and 98 deletions

View File

@@ -1,4 +1,5 @@
name: Create a release name: Create GitHub Release
description: Automatically creates a release when a PR is merged that both that changes package.json and has the Release label.
on: on:
pull_request: pull_request:
@@ -18,12 +19,17 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: lts/* node-version: lts/*
- name: Get current version - name: Get current version
id: current_version id: current_version
run: echo ::set-output name=version::$(node -p "require('./package.json').version") run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
- name: Create release - name: Create release
id: create_release id: create_release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
@@ -35,6 +41,7 @@ jobs:
prerelease: false prerelease: false
generate_release_notes: true generate_release_notes: true
make_latest: "true" make_latest: "true"
publish: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: >
@@ -42,10 +49,12 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'Release') contains(github.event.pull_request.labels.*.name, 'Release')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: lts/* node-version: lts/*
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build
- run: npm publish --access public - run: npm publish --access public

View File

@@ -5,96 +5,92 @@ name: Test ComfyUI Frontend
on: on:
push: push:
branches: branches: [main, master]
- main
- master
pull_request: pull_request:
branches: branches: [main, master]
- main
- master
jobs: jobs:
test-comfyui-frontend: test-comfyui-frontend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout litegraph - name: Checkout litegraph
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
path: "litegraph" path: "litegraph"
- name: Checkout ComfyUI - name: Checkout ComfyUI
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: "comfyanonymous/ComfyUI" repository: "comfyanonymous/ComfyUI"
path: "ComfyUI" path: "ComfyUI"
ref: master ref: master
- name: Checkout ComfyUI_frontend - name: Checkout ComfyUI_frontend
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: "Comfy-Org/ComfyUI_frontend" repository: "Comfy-Org/ComfyUI_frontend"
path: "ComfyUI_frontend" path: "ComfyUI_frontend"
- name: Checkout ComfyUI_devtools - name: Checkout ComfyUI_devtools
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: "Comfy-Org/ComfyUI_devtools" repository: "Comfy-Org/ComfyUI_devtools"
path: "ComfyUI/custom_nodes/ComfyUI_devtools" path: "ComfyUI/custom_nodes/ComfyUI_devtools"
ref: 080e6d4af809a46852d1c4b7ed85f06e8a3a72be ref: 080e6d4af809a46852d1c4b7ed85f06e8a3a72be
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: lts/* node-version: lts/*
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: '3.10' python-version: "3.10"
- name: Install ComfyUI requirements - name: Install requirements
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -r requirements.txt pip install -r requirements.txt
pip install wait-for-it pip install wait-for-it
working-directory: ComfyUI working-directory: ComfyUI
- name: Build litegraph - name: Build litegraph
run: | run: |
npm ci npm ci
npm run build npm run build
working-directory: litegraph working-directory: litegraph
- name: Install updated litegraph in ComfyUI_frontend - name: Install updated litegraph in ComfyUI_frontend
run: | run: |
npm ci npm ci
npm install ../litegraph npm install ../litegraph
npm run fetch-templates npm run fetch-templates
npm run build npm run build
working-directory: ComfyUI_frontend working-directory: ComfyUI_frontend
- name: Start ComfyUI server - name: Start ComfyUI server
run: | run: |
python main.py --cpu --multi-user --front-end-root ../ComfyUI_frontend/dist & python main.py --cpu --multi-user --front-end-root ../ComfyUI_frontend/dist &
wait-for-it --service 127.0.0.1:8188 -t 600 wait-for-it --service 127.0.0.1:8188 -t 600
working-directory: ComfyUI working-directory: ComfyUI
- name: Run UI tests - name: Run UI tests
run: | run: |
npm run test:component npm run test:component
npm run test:unit npm run test:unit
working-directory: ComfyUI_frontend working-directory: ComfyUI_frontend
- name: Install Playwright Browsers - name: Install Playwright Browsers
run: npx playwright install chromium --with-deps run: npx playwright install chromium --with-deps
working-directory: ComfyUI_frontend working-directory: ComfyUI_frontend
- name: Run Playwright tests - name: Run Playwright tests (chromium)
run: npx playwright test --project=chromium run: npx playwright test --project=chromium
working-directory: ComfyUI_frontend working-directory: ComfyUI_frontend
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
name: playwright-report name: playwright-report
path: ComfyUI_frontend/playwright-report/ path: ComfyUI_frontend/playwright-report/
retention-days: 30 retention-days: 30

View File

@@ -1,16 +1,10 @@
name: Tests CI name: Unit Test, Lint, and Format
on: on:
push: push:
branches: branches: [main, master, "dev*"]
- main
- master
- "dev*"
pull_request: pull_request:
branches: branches: [main, master, "dev*"]
- main
- master
- "dev*"
jobs: jobs:
test: test:
@@ -18,19 +12,24 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: lts/* node-version: lts/*
- name: Build - name: Build
run: | run: |
npm ci npm ci
npm run build npm run build
- name: Run lint - name: Run lint
run: | run: |
npm run lint:ci npm run lint:ci
- name: Run format - name: Run format
run: | run: |
npm run format npm run format
- name: Run vitest tests - name: Run vitest tests
run: | run: |
npm test -- --reporter=verbose npm test -- --reporter=verbose

View File

@@ -1,17 +1,15 @@
name: Version Bump name: Release a New Version
description: Creates a PR to increment the version. When the PR is merged, it will automatically create a release.
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
version_type: version_type:
description: 'Version increment type' description: Version increment type
required: true required: true
default: 'patch' default: patch
type: 'choice' type: choice
options: options: [patch, minor, major]
- patch
- minor
- major
jobs: jobs:
bump-version: bump-version:
@@ -28,7 +26,7 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: lts/* node-version: lts/*
cache: 'npm' cache: "npm"
- name: Bump version - name: Bump version
id: bump-version id: bump-version
@@ -37,15 +35,21 @@ jobs:
NEW_VERSION=$(node -p "require('./package.json').version") NEW_VERSION=$(node -p "require('./package.json').version")
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Format PR string
id: capitalised
run: |
CAPITALISED_TYPE=${${{ github.event.inputs.version_type }}@u}
echo "capitalised=$CAPITALISED_TYPE" >> $GITHUB_OUTPUT
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v7
with: with:
token: ${{ secrets.PR_GH_TOKEN }} token: ${{ secrets.PR_GH_TOKEN }}
commit-message: '[release] Bump version to ${{ steps.bump-version.outputs.NEW_VERSION }}' commit-message: "[Release] Increment version to ${{ steps.bump-version.outputs.NEW_VERSION }}"
title: '${{ steps.bump-version.outputs.NEW_VERSION }}' title: ${{ steps.bump-version.outputs.NEW_VERSION }}
body: | body: |
Automated version bump to ${{ steps.bump-version.outputs.NEW_VERSION }} ${{ steps.capitalised.outputs.capitalised }} version increment to ${{ steps.bump-version.outputs.NEW_VERSION }}
branch: version-bump-${{ steps.bump-version.outputs.NEW_VERSION }} branch: version-bump-${{ steps.bump-version.outputs.NEW_VERSION }}
base: master base: master
labels: | labels: |
Release Release