Skip to content

Commit 88ae2ee

Browse files
committed
ci: run sdk e2e suite — hermetic mocks made it CI-safe
The sdk e2e/ directory (72 tests, fully in-memory since da507ca) was never executed in CI: the test job only ran 'find src -name *.test.ts'. Mock drift accumulated there for months undetected. Add an sdk-specific branch to the matrix step that runs unit + e2e files in one bun test invocation.
1 parent bae248e commit 88ae2ee

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ jobs:
151151
fi
152152
elif [ "${{ matrix.package }}" = "web" ]; then
153153
bun run test --runInBand
154+
elif [ "${{ matrix.package }}" = "sdk" ]; then
155+
# Unit tests + the deterministic mocked e2e suite. The e2e dir
156+
# is hermetic (in-memory stores, no network) but was never run
157+
# in CI before, which let mock drift accumulate for months.
158+
UNIT_FILES=$(find src -name '*.test.ts' ! -name '*.integration.test.ts' 2>/dev/null | sort | tr '\n' ' ')
159+
E2E_FILES=$(find e2e -name '*.test.ts' 2>/dev/null | sort | tr '\n' ' ')
160+
if [ -n "$UNIT_FILES" ] || [ -n "$E2E_FILES" ]; then
161+
bun test $UNIT_FILES $E2E_FILES
162+
else
163+
echo "No tests found in sdk"
164+
fi
154165
else
155166
# Run all non-integration tests in a single bun test invocation
156167
# This avoids xargs exit code issues with orphaned child processes

0 commit comments

Comments
 (0)