Files
dolphin dbd7495509 feat(frontend): check-i18n gate — key parity + backend error-code coverage (ledger #28/#11)
- scripts/check-i18n.mjs: every locale file must expose identical key sets
  across zh-Hans/en/ja; shared packages/locales held to zero drift
- reconciles backend errcode registry against api_errors copy: new backend
  codes without frontend copy fail CI (23 legacy gaps frozen)
- legacy drift frozen in scripts/i18n-baseline.json, shrink-only
  (--update-baseline after healing); wired into frontend-quality.yml
2026-07-23 16:26:56 +08:00

62 lines
1.6 KiB
YAML

name: Frontend Quality
# Quality gate for the two frontend apps.
# Policy: legacy violations are frozen in each app's eslint-suppressions.json and
# via @ts-strict-ignore file annotations; suppressed counts may only shrink.
# Any NEW lint violation or strict-mode type error fails this workflow.
on:
pull_request:
paths:
- "src/frontend/**"
- ".github/workflows/frontend-quality.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Lint & Typecheck
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: src/frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Shared locale artifacts in sync (packages/locales)
run: pnpm --filter @bisheng/locales check
- name: i18n consistency (key parity + backend error-code coverage)
run: pnpm check-i18n
- name: Lint platform
run: pnpm --filter bisheng lint
- name: Lint client
run: pnpm --filter bishengchat lint
- name: Typecheck platform (strict, non-exempted files)
run: pnpm --filter bisheng typecheck
- name: Typecheck client (strict, non-exempted files)
run: pnpm --filter bishengchat typecheck