mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-01 20:55:16 +09:00
102 lines
3.6 KiB
YAML
102 lines
3.6 KiB
YAML
name: Frontend CI
|
|
|
|
# Run the warning ratchet, repository integrity checks, unit tests and browser
|
|
# regressions. Release Build Smoke Test separately compiles the production app.
|
|
#
|
|
# backend/app/** is in the paths because check-html-sinks scans it too (for
|
|
# `|safe`, `Markup(`, `render_template_string`), so a backend-only commit can
|
|
# introduce a sink this must catch.
|
|
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
paths:
|
|
- 'frontend/**'
|
|
- 'backend/app/**'
|
|
- 'scripts/check-html-sinks.mjs'
|
|
- '.github/workflows/frontend-ci.yml'
|
|
pull_request:
|
|
branches: [main, dev]
|
|
paths:
|
|
- 'frontend/**'
|
|
- 'backend/app/**'
|
|
- 'scripts/check-html-sinks.mjs'
|
|
- '.github/workflows/frontend-ci.yml'
|
|
workflow_call:
|
|
|
|
jobs:
|
|
lint:
|
|
name: lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
cache-dependency-path: frontend/package-lock.json
|
|
- name: Install dependencies
|
|
working-directory: frontend
|
|
run: npm ci
|
|
- name: Lint
|
|
# Reject errors and warning growth by file/rule, then run all integrity
|
|
# checks chained by package.json. Keep the baseline reviewed in Git.
|
|
working-directory: frontend
|
|
run: npm run lint
|
|
- name: Unit tests
|
|
# node --test over src/**/__tests__ — pure-logic modules, no jsdom.
|
|
working-directory: frontend
|
|
run: npm test
|
|
- name: Install browser for regressions
|
|
working-directory: frontend
|
|
run: npx playwright install --with-deps chromium
|
|
- name: Settings browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:browser
|
|
- name: Settings surfaces and assistant browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:settings-ui
|
|
- name: Shared controls browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:controls
|
|
- name: Metrics and widget browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:metrics
|
|
- name: Authentication and layout hooks browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:hooks
|
|
- name: Backup request and form browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:backups
|
|
- name: SVG sanitizer browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:sanitize-svg
|
|
- name: Terminal log viewer browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:terminal-logs
|
|
- name: Docker tabs browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:docker-tabs
|
|
- name: File Manager browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:file-manager
|
|
- name: Effective environment and preview browser regressions
|
|
working-directory: frontend
|
|
run: node scripts/effective-environment-browser.mjs
|
|
- name: Search focus browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:search-focus
|
|
- name: Assistant deployment browser regressions
|
|
working-directory: frontend
|
|
run: npm run test:ai-operations
|
|
- name: Layout screenshot regressions
|
|
working-directory: frontend
|
|
run: npm run test:layout
|
|
- name: Upload Settings screenshots
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: settings-browser-screenshots
|
|
path: frontend/test-results/
|
|
if-no-files-found: ignore
|