Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

ci: pin the control-api real-Postgres suites through the JSON reporter

Alfredo Lopez11eba20cda02
diff --git a/.github/workflows/ci-public.yml b/.github/workflows/ci-public.yml
index deae46cb8..1aea010d1 100644
--- a/.github/workflows/ci-public.yml
+++ b/.github/workflows/ci-public.yml
@@ -183,8 +183,10 @@ jobs:
tests/e2e/fixtures/image-capabilities/provider.test.mjs \
tests/e2e/fixtures/image-capabilities/sdk.test.mjs
- # Typecheck against the base tsconfig (covers src + test dirs).
- # This catches errors in test files that tsconfig.build.json may exclude.
+ # Typecheck against each package's base tsconfig. Its `include` decides
+ # whether test files are covered: where it lists test dirs, this catches
+ # errors that tsconfig.build.json may exclude. control-api's includes
+ # src/** only, so its test files are not typechecked here.
#
# mcp-servers is skipped: it has no root tsconfig.json (only the web-search and
# doc-generator sub-projects have one), so `tsc --noEmit` there resolves no
@@ -270,9 +272,11 @@ jobs:
set -euo pipefail
log_file="$(mktemp)"
normalized_log="$(mktemp)"
- trap 'rm -f "$log_file" "$normalized_log"' EXIT
+ report="$(mktemp)"
+ trap 'rm -f "$log_file" "$normalized_log" "$report"' EXIT
test -n "${CONTROL_API_REAL_PG_ADMIN_URL}"
- FORCE_COLOR=0 NO_COLOR=1 npm test -- --run realPostgres 2>&1 | tee "$log_file"
+ FORCE_COLOR=0 NO_COLOR=1 npm test -- --run realPostgres \
+ --reporter=default --reporter=json --outputFile="$report" 2>&1 | tee "$log_file"
sed $'s/\033\\[[0-9;]*m//g' "$log_file" > "$normalized_log"
grep -Eq 'Test Files[[:space:]]+[1-9][0-9]* passed' "$normalized_log" || {
echo 'real-Postgres control-api lane executed zero passing test files' >&2
@@ -288,34 +292,28 @@ jobs:
fi
# Pinned suites (Codex/Grok subscription, provider attempts, and the
# external GFS rate-limit suites) must stay inside the real-Postgres
- # filter. A rename or move that drops them from `*realPostgres*` would
- # otherwise still pass the aggregate counts above.
- for suite in \
- db.codexSubscriptionConnection.realPostgres.integration \
- services.codexSubscriptionOAuth.realPostgres.integration \
- services.codexSubscriptionCatalog.realPostgres.integration \
- services.llmProviderAttemptAuthorization.realPostgres.integration \
- services.llmProviderAttemptStore.realPostgres.integration \
- services.llmProviderAttemptRedemption.realPostgres.integration \
- services.llmProviderAttemptFinalization.realPostgres.integration \
- pluginWorkloadSdkCodexDualLedger.realPostgres.integration \
- pluginWorkloadSdkGrokDualLedger.realPostgres.integration \
- services.grokSubscriptionConnection.realPostgres.integration \
- services.grokProviderAttemptRedemption.realPostgres.integration \
- services.grokProviderAttemptRedemption.refresh.realPostgres.integration \
- services.codexSubscriptionLifecycle.realPostgres.integration \
- db.llmProviderAttemptConnectionIntegrity.realPostgres.integration \
- services.llmCatalogSync.realPostgres.integration \
- routes.externalGfsRateLimitStress.realPostgres.integration \
- routes.externalGfsRateLimitFailClosed.realPostgres.integration \
- routes.rateLimitProcessMemory.realPostgres.integration \
- services.rateLimiterPoolSaturation.realPostgres.integration
- do
- grep -Fq "$suite" "$normalized_log" || {
- echo "real-Postgres control-api lane omitted pinned suite ${suite}" >&2
- exit 1
- }
- done
+ # filter and run. The check reads the JSON report, not the console:
+ # a file whose tests are all skipped is still printed by name.
+ node ../scripts/ci/assert-pinned-vitest-suites.mjs "$report" \
+ db.codexSubscriptionConnection.realPostgres.integration.test.ts \
+ services.codexSubscriptionOAuth.realPostgres.integration.test.ts \
+ services.codexSubscriptionCatalog.realPostgres.integration.test.ts \
+ services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts \
+ services.llmProviderAttemptStore.realPostgres.integration.test.ts \
+ services.llmProviderAttemptRedemption.realPostgres.integration.test.ts \
+ services.llmProviderAttemptFinalization.realPostgres.integration.test.ts \
+ pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts \
+ pluginWorkloadSdkGrokDualLedger.realPostgres.integration.test.ts \
+ services.grokSubscriptionConnection.realPostgres.integration.test.ts \
+ services.grokProviderAttemptRedemption.realPostgres.integration.test.ts \
+ services.grokProviderAttemptRedemption.refresh.realPostgres.integration.test.ts \
+ services.codexSubscriptionLifecycle.realPostgres.integration.test.ts \
+ db.llmProviderAttemptConnectionIntegrity.realPostgres.integration.test.ts \
+ services.llmCatalogSync.realPostgres.integration.test.ts \
+ routes.externalGfsRateLimitStress.realPostgres.integration.test.ts \
+ routes.externalGfsRateLimitFailClosed.realPostgres.integration.test.ts \
+ routes.rateLimitProcessMemory.realPostgres.integration.test.ts \
+ services.rateLimiterPoolSaturation.realPostgres.integration.test.ts
- name: Install gfs-controller dependencies
working-directory: gfs-controller