open-notebook/.github/workflows/test.yml
Luis Novo fb21f5e777
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
2026-02-14 20:14:08 -03:00

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