Skip to content

Commit 51a4ba9

Browse files
committed
fix(ci): clear Vitest cache before running tests
Add Vitest cache clearing to test-setup-script to prevent stale cached test helpers from causing failures. This fixes issues where Vitest caches old versions of test helper files that have been updated or removed. The cache is cleared before building to ensure all test runs use fresh helper code, particularly after the removal of broken mock setup helpers.
1 parent 028d12e commit 51a4ba9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: SocketDev/socket-registry/.github/workflows/ci.yml@d8ff3b0581d799466cfbf150f715c1a4bf9f84a5 # 2025-10-23
4242
with:
4343
working-directory: 'packages/cli'
44-
test-setup-script: 'cd packages/cli && pnpm run build'
44+
test-setup-script: 'cd packages/cli && rm -rf node_modules/.vite && pnpm run build'
4545
lint-script: 'cd packages/cli && pnpm run check'
4646
type-check-script: 'cd packages/cli && pnpm run type'
4747
test-script: ${{ inputs.skip-tests && 'echo "Tests skipped"' || 'cd packages/cli && pnpm run test:unit' }}

0 commit comments

Comments
 (0)