- ci.yml: API lint (ruff F+I) + pytest, web vue-tsc + vitest + build - mirror.yml: push to GitHub (CircuitForgeLLC) + Codeberg (CircuitForge) on main/tags - release.yml: Docker build → Forgejo registry + release via API; GHCR deferred pending BSL policy (cf-agents#3) - .cliff.toml: git-cliff changelog config for semver releases - pyproject.toml: add [dev] extras (pytest, ruff), ruff config - Fix 45 ruff violations across codebase (import sorting, unused vars, unused imports)
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
api:
|
|
name: API — lint + test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install circuitforge-core
|
|
env:
|
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
|
run: |
|
|
git clone https://x-token:${FORGEJO_TOKEN}@git.opensourcesolarpunk.com/Circuit-Forge/circuitforge-core.git /tmp/circuitforge-core
|
|
pip install -e /tmp/circuitforge-core
|
|
|
|
- name: Install snipe + dev deps
|
|
run: pip install -e ".[dev]"
|
|
|
|
- name: Lint (ruff)
|
|
run: ruff check app/ api/ tests/
|
|
|
|
- name: Run tests
|
|
run: pytest tests/ -v
|
|
|
|
web:
|
|
name: Web — typecheck + test + build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
|
|
- name: Install deps
|
|
working-directory: web
|
|
run: npm ci
|
|
|
|
- name: Type check
|
|
working-directory: web
|
|
run: npx vue-tsc --noEmit
|
|
|
|
- name: Unit tests
|
|
working-directory: web
|
|
run: npm test
|
|
|
|
- name: Build
|
|
working-directory: web
|
|
run: npm run build
|