mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 11:30:00 +00:00
- 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
59 lines
1.1 KiB
YAML
59 lines
1.1 KiB
YAML
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
|