Skip to content

Commit 2f6f323

Browse files
committed
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.
1 parent ec99d66 commit 2f6f323

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,33 @@ jobs:
4848
- run: pnpm install --frozen-lockfile
4949
- run: pnpm run test --shard=${{ matrix.shard }}/5
5050

51+
# minidb's cluster/stress suite is process-heavy and flakes under the
52+
# shared shard matrix; run it in its own job outside the default projects.
53+
test-minidb:
54+
runs-on: ubuntu-latest
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- uses: pnpm/action-setup@v6
60+
61+
- uses: actions/setup-node@v7
62+
with:
63+
node-version-file: .nvmrc
64+
cache: pnpm
65+
66+
- run: pnpm install --frozen-lockfile
67+
- run: pnpm --filter @pymodel/minidb test
68+
5169
test-complete:
5270
name: test
5371
if: always()
54-
needs: test
72+
needs: [test, test-minidb]
5573
runs-on: ubuntu-latest
5674

5775
steps:
5876
- name: Verify all test shards passed
59-
if: needs.test.result != 'success'
77+
if: needs.test.result != 'success' || needs.test-minidb.result != 'success'
6078
run: exit 1
6179

6280
# pi-tui's suite runs on node:test (not vitest), so the root `pnpm run test`

vitest.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ import { vscodeProjects } from './apps/vscode/vitest.projects';
44

55
export default defineConfig({
66
test: {
7-
projects: ['packages/*', 'apps/pythinker-code', 'apps/desktop', 'apps/pythinker-web', ...vscodeProjects],
7+
projects: [
8+
'packages/*',
9+
'!packages/minidb',
10+
'apps/pythinker-code',
11+
'apps/desktop',
12+
'apps/pythinker-web',
13+
...vscodeProjects,
14+
],
815
coverage: {
916
provider: 'v8',
1017
include: ['packages/*/src/**/*.ts', 'apps/*/src/**/*.ts'],

0 commit comments

Comments
 (0)