Files
Handy/.github/workflows/code-quality.yml
CJ Pais 93c9ee05ef catalog from @handy-computer/models package (#2299)
* feat: use shared model catalog

* fix: preserve other model quants on deletion

* fix: offer retired model replacements

* fix: preserve unreadable model caches

* fix: report model deletion failures

* refactor: simplify model availability and cache reuse

* fix: match cached repos to the catalog by exact name

HF repo ids are case-insensitive, so another tool can cache a catalog repo
under other casing. Matching it case-insensitively relabelled the file with
the catalog's casing, which on a case-sensitive filesystem points at a
folder that doesn't exist, so the model vanished. Exact matching (as on
main) keeps such a file listed under the casing it was found at.

* fix: harden model deletion and catalog check on Windows
2026-10-20 13:23:01 +08:00

66 lines
1.5 KiB
YAML

name: "code quality"
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "src/**"
- "src-tauri/src/catalog/catalog.json"
- "scripts/**"
- "package.json"
- "bun.lock"
- ".eslintrc*"
- "eslint.config.*"
- ".prettierrc*"
- "tsconfig*"
- "tailwind.config.*"
- ".github/workflows/**"
pull_request:
paths:
- "src/**"
- "src-tauri/src/catalog/catalog.json"
- "scripts/**"
- "package.json"
- "bun.lock"
- ".eslintrc*"
- "eslint.config.*"
- ".prettierrc*"
- "tsconfig*"
- "tailwind.config.*"
- ".github/workflows/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check translation consistency
run: bun run check:translations
- name: Check model language coverage
run: bun run check:model-languages
- name: Check bundled model catalog matches @handy-computer/models
run: bun run check:catalog
- name: Test keyboard utilities
run: bun run test:keyboard
- name: Run ESLint
run: bun run lint
- name: Run prettier
run: bun run format:check