init new frontend

This commit is contained in:
Bradley Nelson
2026-06-17 17:06:30 -06:00
parent b8a0018785
commit daa3010458
114 changed files with 32716 additions and 119 deletions
+23 -54
View File
@@ -32,15 +32,7 @@ jobs:
with:
filters: |
frontend:
- 'static/**'
- 'biome.json'
- '.grit'
- '.stylelintrc.json'
- 'jsconfig.json'
# Audit scripts that gate frontend correctness — touch
# them and the frontend job must re-run.
- 'tools/check-missing-translations.py'
- 'tools/check-icons.py'
- 'frontend/**'
backend:
- 'src/**'
- 'Cargo.toml'
@@ -59,56 +51,31 @@ jobs:
- 'src/application/adapters/plugin_user_lifecycle_hook.rs'
frontend-check:
name: Frontend — CSS and JS checks (format, lint, css-rules, types)
name: Frontend — svelte-check, ESLint, Stylelint, Prettier
needs: changes
if: needs.changes.outputs.frontend == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- name: Install Biome
uses: biomejs/setup-biome@v2
- name: Run Biome check
run: biome ci static/
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 25
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json
# because we are not using package.json
- name: Install Stylelint, TypeScript and plugins
run: |
npm install --global \
stylelint@17 \
postcss@8 \
stylelint-value-no-unknown-custom-properties@6 \
typescript
- name: Install dependencies
run: npm ci
- name: Run Stylelint
run: npx stylelint "static/css/**/*.{css,scss}"
- name: Check (svelte-check + eslint + stylelint + prettier)
run: npm run check
- name: Run TypeScript check
run: tsc -p jsconfig.json --noEmit
- name: Check locale files are at parity with en.json
# Python 3 stdlib only — no setup step needed.
# `--check-only` keeps the CI log terse; failures still surface
# via exit code (the script returns 1 when any non-English
# locale is missing a key present in en.json). Mirrors the
# `--check-only` flag on `tools/check-icons.py` below.
# Run locally without --check-only to see the missing keys.
run: python3 tools/check-missing-translations.py --check-only
- name: Check FA icons referenced in static/ are registered
# `--check-only` skips the Font-Awesome clone and the icons.js
# patch — it just scans `fas fa-<name>` references and diffs
# them against OxiIcons. Exit 1 if any used icon is absent
# from the registry. Run locally without --check-only to
# auto-add missing entries from a checked-out Font-Awesome
# source.
run: python3 tools/check-icons.py --check-only
- name: Unit tests
run: npm run test:unit
rust-fmt:
name: Rustfmt
@@ -268,14 +235,16 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Build SPA (Vite -> static-dist/)
working-directory: frontend
run: npm ci && npm run build
- run: cargo build --release
# build.rs runs the deconflict pass and js_bundle_validate() — any
# duplicate declaration or parse error in the JS bundle fails here.
- name: Validate JS bundle (node --check)
# belt-and-suspenders: node --check parses the bundle without executing it.
# Catches SyntaxErrors that OXC's parse check inside build.rs would also
# catch, but gives a human-readable error line in the CI log.
run: node --check static-dist/js/app.*.js
- uses: actions/upload-artifact@v4
with:
name: oxicloud-release