mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-05-04 14:20:36 +00:00
feat: add CI test workflow and improve i18n validation (#580)
- Add GitHub Actions workflow to run backend (pytest) and frontend (vitest) tests on PRs and pushes to main - Replace hardcoded locale parity tests with dynamic discovery from the resources registry, so new languages are tested automatically - Add unused key detection test that scans source files for i18n key references, with optional chaining normalization - Remove 149 genuinely unused translation keys from all 7 locale files - Add missing keys to it-IT (7) and ru-RU (5) with English fallback
This commit is contained in:
parent
9b507f111c
commit
fb21f5e777
9 changed files with 444 additions and 1417 deletions
59
.github/workflows/test.yml
vendored
Normal file
59
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
name: Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/claude*.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
backend:
|
||||
name: Backend Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@v4
|
||||
with:
|
||||
enable-cache: true
|
||||
|
||||
- name: Set up Python
|
||||
run: uv python install
|
||||
|
||||
- name: Install dependencies
|
||||
run: uv sync
|
||||
|
||||
- name: Run tests
|
||||
run: uv run pytest tests/ -v
|
||||
|
||||
frontend:
|
||||
name: Frontend Tests
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: frontend
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
Loading…
Add table
Add a link
Reference in a new issue