Files
Azornes-Comfyui-LayerForge/.github/workflows/ci.yml
T

80 lines
1.9 KiB
YAML

name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
frontend:
name: Frontend tests, lint, and typecheck
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install JavaScript dependencies
run: npm ci
- name: Run JavaScript tests
run: npm test
- name: Run ESLint
run: npm run lint
- name: Check TypeScript
run: npx tsc --noEmit
backend:
name: Python tests, coverage, and static checks
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: pip
- name: Install Python dependencies
run: python -m pip install --upgrade pip && python -m pip install -e ".[dev]"
- name: Run Python tests with coverage
run: >-
python -m pytest -q
--cov=python
--cov-report=term-missing
--cov-report=xml:coverage-python.xml
--cov-fail-under=75
- name: Upload Python coverage report
uses: actions/upload-artifact@v4
with:
name: python-coverage
path: coverage-python.xml
if-no-files-found: error
- name: Run Ruff
run: python -m ruff check __init__.py canvas_node.py python tests
- name: Check Python syntax
run: python -m compileall -q __init__.py canvas_node.py python tests