[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:
pull_request:
@@ -18,12 +19,17 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Get 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
id: create_release
uses: softprops/action-gh-release@v2
@@ -35,6 +41,7 @@ jobs:
prerelease: false
generate_release_notes: true
make_latest: "true"
publish:
runs-on: ubuntu-latest
if: >
@@ -42,10 +49,12 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'Release')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish --access public

View File

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

View File

@@ -1,16 +1,10 @@
name: Tests CI
name: Unit Test, Lint, and Format
on:
push:
branches:
- main
- master
- "dev*"
branches: [main, master, "dev*"]
pull_request:
branches:
- main
- master
- "dev*"
branches: [main, master, "dev*"]
jobs:
test:
@@ -18,19 +12,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Build
run: |
npm ci
npm run build
- name: Run lint
run: |
npm run lint:ci
- name: Run format
run: |
npm run format
- name: Run vitest tests
run: |
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:
workflow_dispatch:
inputs:
version_type:
description: 'Version increment type'
description: Version increment type
required: true
default: 'patch'
type: 'choice'
options:
- patch
- minor
- major
default: patch
type: choice
options: [patch, minor, major]
jobs:
bump-version:
@@ -28,7 +26,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
cache: "npm"
- name: Bump version
id: bump-version
@@ -37,15 +35,21 @@ jobs:
NEW_VERSION=$(node -p "require('./package.json').version")
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
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PR_GH_TOKEN }}
commit-message: '[release] Bump version to ${{ steps.bump-version.outputs.NEW_VERSION }}'
title: '${{ 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 }}
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 }}
base: master
labels: |
Release
Release