Commit Graph

7 Commits

Author SHA1 Message Date
czlonkowski
7f4c0ae3a9 fix: prevent MSW from loading globally to fix CI test hanging
- Remove msw-setup.ts from global vitest setupFiles
- Create separate integration-specific MSW setup
- Add vitest.config.integration.ts for integration tests
- Update package.json to use integration config for integration tests
- Update CI workflow to run unit and integration tests separately
- Add aggressive cleanup in integration MSW setup for CI environment

This prevents MSW from being initialized for unit tests where it's not needed,
which was causing tests to hang in CI after all tests completed.
2025-07-29 14:16:13 +02:00
czlonkowski
b9eda61729 fix: resolve test hanging issue in CI
- Reduce CI reporters to prevent resource contention (removed json/html)
- Optimize coverage settings with all:false and skipFull:true
- Fix MSW waitForRequest memory leak by adding timeout and cleanup
- Add teardownTimeout to vitest config
- Add 10-minute timeout to GitHub Actions job
- Create emergency test script without coverage for debugging

The main issues were:
1. Coverage collection with multiple reporters causing exhaustion
2. MSW event listener that could hang indefinitely
3. Too many simultaneous reporters (4 at once)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 13:40:18 +02:00
czlonkowski
1d464e29e5 test: add Phase 4 database integration tests (partial)
- Add comprehensive test utilities for database testing
- Implement connection management tests for in-memory and file databases
- Add transaction tests including nested transactions and savepoints
- Test database lifecycle, error handling, and performance
- Include tests for WAL mode, connection pooling, and constraints

Part of Phase 4: Integration Testing
2025-07-29 09:36:14 +02:00
czlonkowski
966c19c317 fix: resolve TypeScript linting errors preventing CI pass
- Removed invalid workflow property from createTestTemplate function
- Fixed TemplateWorkflow interface usage to use nodes directly
- Removed unsupported watchExclude property from vitest config
- Updated seedTestTemplates to properly handle template data structure

All TypeScript errors are now resolved.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 23:48:22 +02:00
czlonkowski
61de107c4b feat: complete Phase 3.8 - test infrastructure and CI/CD enhancements
- Add test result artifacts storage with multiple formats (JUnit, JSON, HTML)
- Configure GitHub Actions to upload and preserve test outputs
- Add PR comment integration with test summaries
- Create benchmark comparison workflow for PR performance tracking
- Add detailed test report generation scripts
- Configure artifact retention policies (30 days for tests, 90 for combined)
- Set up test metadata collection for better debugging

This completes all remaining test infrastructure tasks and provides
comprehensive visibility into test results across CI/CD pipeline.
2025-07-28 22:56:15 +02:00
czlonkowski
b5210e5963 feat: add comprehensive performance benchmark tracking system
- Create benchmark test suites for critical operations:
  - Node loading performance
  - Database query performance
  - Search operations performance
  - Validation performance
  - MCP tool execution performance

- Add GitHub Actions workflow for benchmark tracking:
  - Runs on push to main and PRs
  - Uses github-action-benchmark for historical tracking
  - Comments on PRs with performance results
  - Alerts on >10% performance regressions
  - Stores results in GitHub Pages

- Create benchmark infrastructure:
  - Custom Vitest benchmark configuration
  - JSON reporter for CI results
  - Result formatter for github-action-benchmark
  - Performance threshold documentation

- Add supporting utilities:
  - SQLiteStorageService for benchmark database setup
  - MCPEngine wrapper for testing MCP tools
  - Test factories for generating benchmark data
  - Enhanced NodeRepository with benchmark methods

- Document benchmark system:
  - Comprehensive benchmark guide in docs/BENCHMARKS.md
  - Performance thresholds in .github/BENCHMARK_THRESHOLDS.md
  - README for benchmarks directory
  - Integration with existing test suite

The benchmark system will help monitor performance over time and catch regressions before they reach production.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 22:45:09 +02:00
czlonkowski
aa3b2a8460 test: migrate from Jest to Vitest (Phase 1 complete)
- Remove Jest and all related packages
- Install Vitest with coverage support
- Create vitest.config.ts with path aliases
- Set up global test configuration
- Migrate all 6 test files to Vitest syntax
- Update TypeScript configuration for better Vitest support
- Create separate tsconfig.build.json for clean builds
- Fix all import/module issues in tests
- All 68 tests passing successfully
- Current coverage baseline: 2.45%

Phase 1 of testing suite improvement complete.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 13:05:38 +02:00