Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ jobs:
- name: Build
run: npm run build


- name: Pack and verify the release like a session
timeout-minutes: 5
run: |
npm run pack
npm run verify:release
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
npm run pack

- name: Verify the release like a session
timeout-minutes: 5
run: npm run verify:release

- name: Publish pre-release v${{ github.run_number }}
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Server routes:

## Testing Guidelines

- CI checks in `.github/workflows/pr.yml`: `lint`, `build:packages`, `typecheck`, `test`, `build`.
- CI checks in `.github/workflows/pr.yml`: `lint`, `build:packages`, `typecheck`, `test`, `build`, `pack` + `verify:release`.
- `.github/workflows/release.yml` publishes every merge to `main` as pre-release `vN` and moves the `prerelease` channel; promote a tested build to `latest` by hand.
- `.codesignal/` mirrors the session scripts of the CodeSignal base task; it is not run from the repository.
- Every workspace with logic uses Vitest (`npm --workspace <path> run test`). The engine and server suites use a stub LLM; the server's SDK suite runs the real Agents SDK against a scripted model, so no API key is needed.
Expand Down
13 changes: 11 additions & 2 deletions scripts/verify-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ try {
const env = { ...process.env, PORT: String(PORT), PROJECT_ROOT: dir };
delete env.OPENAI_API_KEY;
delete env.ANTHROPIC_API_KEY;
server = spawn('npm', ['run', 'start:prod'], { cwd: dir, env, stdio: ['ignore', 'pipe', 'pipe'] });
// Its own process group, so stopping it also stops the node process npm starts.
server = spawn('npm', ['run', 'start:prod'], { cwd: dir, env, stdio: ['ignore', 'pipe', 'pipe'], detached: true });
server.stdout.on('data', (chunk) => (output += chunk));
server.stderr.on('data', (chunk) => (output += chunk));
await waitForServer(server);
Expand Down Expand Up @@ -96,6 +97,14 @@ try {
if (output) console.error(`Server output:\n${output}`);
process.exitCode = 1;
} finally {
server?.kill();
if (server?.pid) {
try {
process.kill(-server.pid, 'SIGTERM');
} catch {
// already stopped
}
}
server?.stdout.destroy();
server?.stderr.destroy();
fs.rmSync(dir, { recursive: true, force: true });
}
Loading