Ingestion

Vitest

Send Vitest test results to RunPilotAI using the JSON reporter.

Configure Vitest JSON reporter

Update vitest.config.ts:

typescript
import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    reporters: ["verbose", "json"],
    outputFile: {
      json: "vitest-results.json",
    },
  },
});

Send results via curl

bash
curl -s -X POST https://runpilotai.com/api/ingest/vitest \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_INGEST_KEY" \
  -d @vitest-results.json

GitHub Actions example

yaml
- run: npx vitest run --reporter=json --outputFile=vitest-results.json

- name: Send to RunPilotAI
  if: always()
  run: |
    curl -s -X POST https://runpilotai.com/api/ingest/vitest \
      -H "Content-Type: application/json" \
      -H "x-api-key: ${{ secrets.RUNPILOT_API_KEY }}" \
      -d @vitest-results.json