60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
name: Validate and publish to Comfy registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version:
|
|
- 24.x
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Typecheck frontend
|
|
run: pnpm run typecheck
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Run backend lint
|
|
run: uv run --extra dev ruff check simple_prompt tests
|
|
|
|
- name: Run backend tests
|
|
run: uv run --extra dev pytest tests/ -v
|
|
|
|
- name: Publish Custom Node
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
|
uses: Comfy-Org/publish-node-action@main
|
|
with:
|
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
|
skip_checkout: 'true'
|