d958fa65cb
* feat: harden CI/CD with coverage enforcement, eliminate Python, add 22 test files
- Port scripts/update-readme.py to Node.js (update-readme.mjs) and remove
Python dependency from release workflow
- Add coverage thresholds to vitest.config.ts with @vitest/coverage-v8
- Run coverage on ubuntu in CI, upload artifacts, add PR coverage comments
- Create E2E workflow (.github/workflows/e2e.yml) with Playwright on ubuntu
- Add test:unit and test:integration scripts for separated test execution
- Add 22 new test files (389 tests) covering previously untested AI layer:
- 6 builtin tool tests (edit, bash, read, write, glob, grep)
- 4 orchestration tests (recovery-manager, qa-loop, qa-reports, parallel-executor)
- 5 auth/client/mcp tests (resolver, types, factory, client, registry)
- 7 runner tests (changelog, commit-message, ideation, insights, insight-extractor,
merge-resolver, roadmap)
Total: 206 test files, 4594 tests passing. Zero Python dependencies in CI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve Windows path separator failures in tests
Use path.join() and path.resolve() for cross-platform path construction
in test assertions instead of hardcoded forward slashes. Also mark E2E
workflow as continue-on-error for pre-existing __dirname ESM issue.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/**/*.spec.ts', 'src/**/*.spec.tsx'],
|
|
exclude: ['node_modules', 'dist', 'out'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'json-summary'],
|
|
include: ['src/**/*.ts', 'src/**/*.tsx'],
|
|
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/**/*.spec.ts', 'src/**/*.spec.tsx', 'src/**/*.d.ts'],
|
|
thresholds: {
|
|
lines: 22,
|
|
branches: 17,
|
|
functions: 19,
|
|
statements: 22
|
|
}
|
|
},
|
|
// Mock Electron modules for unit tests
|
|
alias: {
|
|
electron: resolve(__dirname, 'src/__mocks__/electron.ts'),
|
|
'@sentry/electron/main': resolve(__dirname, 'src/__mocks__/sentry-electron-main.ts'),
|
|
'@sentry/electron/renderer': resolve(__dirname, 'src/__mocks__/sentry-electron-renderer.ts')
|
|
},
|
|
// Setup files for test environment
|
|
setupFiles: ['src/__tests__/setup.ts']
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
'@main': resolve(__dirname, 'src/main'),
|
|
'@renderer': resolve(__dirname, 'src/renderer'),
|
|
'@shared': resolve(__dirname, 'src/shared')
|
|
}
|
|
}
|
|
});
|