From 2f6f323a1fd905f9201a781f424680fac71e4786 Mon Sep 17 00:00:00 2001 From: elkaix Date: Mon, 14 Sep 2026 20:13:13 -0400 Subject: [PATCH] test: run minidb outside the default vitest project matrix Exclude packages/minidb from the root project glob and give it its own CI job so the heavy cluster suite no longer shares shard load with the rest of the monorepo. --- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- vitest.config.ts | 9 ++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db0218dce..2e741b307 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,15 +48,33 @@ jobs: - run: pnpm install --frozen-lockfile - run: pnpm run test --shard=${{ matrix.shard }}/5 + # minidb's cluster/stress suite is process-heavy and flakes under the + # shared shard matrix; run it in its own job outside the default projects. + test-minidb: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v6 + + - uses: actions/setup-node@v7 + with: + node-version-file: .nvmrc + cache: pnpm + + - run: pnpm install --frozen-lockfile + - run: pnpm --filter @pymodel/minidb test + test-complete: name: test if: always() - needs: test + needs: [test, test-minidb] runs-on: ubuntu-latest steps: - name: Verify all test shards passed - if: needs.test.result != 'success' + if: needs.test.result != 'success' || needs.test-minidb.result != 'success' run: exit 1 # pi-tui's suite runs on node:test (not vitest), so the root `pnpm run test` diff --git a/vitest.config.ts b/vitest.config.ts index 315ed88a7..ae406b13b 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,7 +4,14 @@ import { vscodeProjects } from './apps/vscode/vitest.projects'; export default defineConfig({ test: { - projects: ['packages/*', 'apps/pythinker-code', 'apps/desktop', 'apps/pythinker-web', ...vscodeProjects], + projects: [ + 'packages/*', + '!packages/minidb', + 'apps/pythinker-code', + 'apps/desktop', + 'apps/pythinker-web', + ...vscodeProjects, + ], coverage: { provider: 'v8', include: ['packages/*/src/**/*.ts', 'apps/*/src/**/*.ts'],