mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
feat(tests): implement test runner functionality with API integration
- Added Test Runner Service to manage test execution processes for worktrees. - Introduced endpoints for starting and stopping tests, and retrieving test logs. - Created UI components for displaying test logs and managing test sessions. - Integrated test runner events for real-time updates in the UI. - Updated project settings to include configurable test commands. This enhancement allows users to run tests directly from the UI, view logs in real-time, and manage test sessions effectively.
This commit is contained in:
@@ -47,6 +47,12 @@ export type EventType =
|
||||
| 'dev-server:started'
|
||||
| 'dev-server:output'
|
||||
| 'dev-server:stopped'
|
||||
| 'test-runner:started'
|
||||
| 'test-runner:progress'
|
||||
| 'test-runner:output'
|
||||
| 'test-runner:completed'
|
||||
| 'test-runner:error'
|
||||
| 'test-runner:result'
|
||||
| 'notification:created';
|
||||
|
||||
export type EventCallback = (type: EventType, payload: unknown) => void;
|
||||
|
||||
@@ -335,3 +335,6 @@ export { PR_STATES, validatePRState } from './worktree.js';
|
||||
|
||||
// Terminal types
|
||||
export type { TerminalInfo } from './terminal.js';
|
||||
|
||||
// Test runner types
|
||||
export type { TestRunnerInfo } from './test-runner.js';
|
||||
|
||||
@@ -1182,6 +1182,14 @@ export interface ProjectSettings {
|
||||
/** Maximum concurrent agents for this project (overrides global maxConcurrency) */
|
||||
maxConcurrentAgents?: number;
|
||||
|
||||
// Test Runner Configuration
|
||||
/**
|
||||
* Custom command to run tests for this project.
|
||||
* If not specified, auto-detection will be used based on project structure.
|
||||
* Examples: "npm test", "yarn test", "pnpm test", "pytest", "go test ./..."
|
||||
*/
|
||||
testCommand?: string;
|
||||
|
||||
// Phase Model Overrides (per-project)
|
||||
/**
|
||||
* Override phase model settings for this project.
|
||||
|
||||
17
libs/types/src/test-runner.ts
Normal file
17
libs/types/src/test-runner.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Test runner types for the test runner functionality
|
||||
*/
|
||||
|
||||
/**
|
||||
* Information about an available test runner
|
||||
*/
|
||||
export interface TestRunnerInfo {
|
||||
/** Unique identifier for the test runner (e.g., 'vitest', 'jest', 'pytest') */
|
||||
id: string;
|
||||
/** Display name of the test runner (e.g., "Vitest", "Jest", "Pytest") */
|
||||
name: string;
|
||||
/** CLI command to run all tests */
|
||||
command: string;
|
||||
/** Optional: CLI command pattern to run a specific test file */
|
||||
fileCommand?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user