mirror of
https://github.com/OFFIS-ESC/constellation-analyzer
synced 2026-01-27 07:43:41 +00:00
Implements complete testing setup with Vitest and Testing Library, including unit tests for all Zustand stores and CI/CD automation. Test Infrastructure: - Vitest configuration with JSDOM environment - Testing Library for React component testing - Test setup with mocks for React Flow and browser APIs - Comprehensive test suite for all 10 Zustand stores Store Tests Added: - bibliographyStore.test.ts: Bibliography entry management - editorStore.test.ts: Document editor state and operations - graphStore.test.ts: Graph state and node/edge operations - historyStore.test.ts: Undo/redo functionality - panelStore.test.ts: Panel visibility and state management - searchStore.test.ts: Search functionality and filters - settingsStore.test.ts: Application settings persistence - timelineStore.test.ts: Timeline state management - toastStore.test.ts: Toast notification system - workspaceStore.test.ts: Workspace and document operations CI/CD Pipelines: - New CI workflow for PRs and pushes to main/develop - Enhanced deployment workflow with test execution - Automated linting, testing, and type checking - GitHub Actions integration with artifact deployment Build Configuration: - Updated Vite config for test support - Test scripts in package.json (test:run, test:ui, test:watch) - Type checking integrated into build process Documentation: - Architecture review with recommendations - Test documentation and patterns guide All tests passing with comprehensive coverage of store functionality, edge cases, and error handling scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
37 lines
621 B
YAML
37 lines
621 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- develop
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run linter
|
|
run: npm run lint
|
|
|
|
- name: Run tests
|
|
run: npm run test:run
|
|
|
|
- name: Build production (includes type check)
|
|
run: npm run build
|