Compare commits

...
Author SHA1 Message Date
MervinPraisonandClaude Opus 4.8 166091bc8e ci: add frontend build gate for BeautifulUI dashboard (fixes #295)
Adds a `frontend` job to CI that runs `npm ci && npm run build` for
src/frontend on every push/PR to main, failing on TypeScript/Vite build
errors. Uses Node 22 with npm caching keyed on the frontend lockfile.

Also documents the Node version, lockfile, and build/ship path in
src/frontend/README.md.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-23 13:50:39 +00:00
2 changed files with 47 additions and 2 deletions

No files matched your search

+24
View File
@@ -36,6 +36,30 @@ jobs:
- name: Integration smoke tests
run: pytest tests/integration/test_agentic_roundtrip.py tests/test_feature_sdk_backends.py -q --no-cov --timeout=120
frontend:
name: frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: src/frontend/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: src/frontend
# `npm run build` is the dashboard ship path: dist/ is synced to
# src/praisonaiui/templates/frontend/ (see src/frontend/README.md).
- name: Build frontend
run: npm run build
working-directory: src/frontend
docs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
+23 -2
View File
@@ -1,6 +1,27 @@
# React + TypeScript + Vite
# PraisonAIUI Frontend (React + TypeScript + Vite)
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
The BeautifulUI dashboard source. Built with React 19 + Vite 7 + Tailwind v4.
## Build & CI
- **Node.js:** 22 (matches the `frontend` job in `.github/workflows/ci.yml`)
- **Lockfile:** `src/frontend/package-lock.json` — install with `npm ci`
```bash
cd src/frontend
npm ci
npm run build # SPA build → dist/ (dashboard ship path)
npm run build:lib # library build for the @praisonaiui/react package
npm run lint # eslint
```
`npm run build` output in `dist/` is synced to `src/praisonaiui/templates/frontend/`
(the committed bundle served by `aiui build`). The CI `frontend` job runs
`npm ci && npm run build` on PRs to `main` and fails on TypeScript/Vite errors.
## Vite template notes
This project uses a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available: