Skip to content

Mock inference in CI#150

Merged
sgoedecke merged 2 commits intomainfrom
sgoedecke/mock-inference-in-ci
Nov 27, 2025
Merged

Mock inference in CI#150
sgoedecke merged 2 commits intomainfrom
sgoedecke/mock-inference-in-ci

Conversation

@sgoedecke
Copy link
Contributor

@sgoedecke sgoedecke commented Nov 27, 2025

Mocks inference so we can remove continue-on-error: true

Also fixes a bug where the response file wasn't being kept around.

#100

#99

Copilot AI review requested due to automatic review settings November 27, 2025 21:00
@sgoedecke sgoedecke requested a review from a team as a code owner November 27, 2025 21:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a mock inference server for CI testing, eliminating the need for real API credentials during automated tests. The mock server simulates an OpenAI-compatible API endpoint that returns predictable responses.

Key Changes:

  • Added a Node.js-based mock inference server that mimics OpenAI's chat completion API
  • Updated CI workflows to start the mock server before running tests and stop it afterward
  • Removed continue-on-error flags from test steps to enforce proper test validation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
script/mock-inference-server.mjs Creates a mock HTTP server that handles chat completion and health check endpoints for testing
.github/workflows/ci.yml Integrates mock server lifecycle into CI jobs, adds output verification steps, and configures test actions to use the mock endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The temporary file created for response-file was being cleaned up
before downstream steps could access it. Now using keep: true to
ensure the file persists until the job completes.

Also added script/ to eslint ignores for the mock server.
@sgoedecke sgoedecke merged commit 02c6cc3 into main Nov 27, 2025
23 checks passed
@sgoedecke sgoedecke deleted the sgoedecke/mock-inference-in-ci branch November 27, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants