From b146e563aa4d10339002adaadbfc3c266fb45a68 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 8 Jul 2025 08:40:12 +0100 Subject: [PATCH] Retry failing tests for CI --- .github/workflows/test-template.yml | 2 ++ vitest.config.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index 8c33429b8..7ebbbf083 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -55,3 +55,5 @@ jobs: - name: Run tests run: npm run test:ci -- --coverage.include=${{ steps.npm-install.outputs.workspace_path }} ${{ steps.npm-install.outputs.workspace_path }} + env: + CI: true diff --git a/vitest.config.ts b/vitest.config.ts index 77ca20caa..525260a7a 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -11,6 +11,7 @@ export default defineConfig({ mockReset: true, restoreMocks: true, unstubEnvs: true, + retry: process.env.CI ? 3 : 0, alias: { testcontainers: path.resolve(__dirname, "packages/testcontainers/src"), },