diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7713730..de094bf 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -28,5 +28,5 @@ jobs: - run: npm ci - run: npm run clean - run: npm run check - - run: npm run test-ci + - run: npm run test - run: npm run lint diff --git a/package.json b/package.json index 3aef98b..bc9472e 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,7 @@ "patch": "npm version patch -w", "minor": "npm version minor -w", "major": "npm version major -w", - "publish": "turbo run lint build test && npm publish --access public -w", - "test-ci": "npm run test --workspaces --if-present" + "publish": "turbo run lint build test && npm publish --access public -w" }, "license": "ISC", "workspaces": [ diff --git a/packages/form/vitest.config.ts b/packages/form/vitest.config.ts index 1d84d7d..cdd9a50 100644 --- a/packages/form/vitest.config.ts +++ b/packages/form/vitest.config.ts @@ -1,5 +1,8 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ - test: {}, + test: { + testTimeout: 30000, + threads: !process.env.CI, + }, }); diff --git a/packages/validator/test/Validator.astro.test.ts b/packages/validator/test/Validator.astro.test.ts index f8dc215..248c864 100644 --- a/packages/validator/test/Validator.astro.test.ts +++ b/packages/validator/test/Validator.astro.test.ts @@ -9,9 +9,13 @@ describe('Example Tests', () => { }); describe('Component test', async () => { - it('example component should not be empty', async () => { - component = await getComponentOutput('./Validator.astro'); - expect(component.html).not.to.equal('\n'); - }); + it( + 'example component should not be empty', + async () => { + component = await getComponentOutput('./Validator.astro'); + expect(component.html).not.to.equal('\n'); + }, + { timeout: 10000, retry: 3 } + ); }); }); diff --git a/packages/validator/vitest.config.ts b/packages/validator/vitest.config.ts index 1d84d7d..376ff24 100644 --- a/packages/validator/vitest.config.ts +++ b/packages/validator/vitest.config.ts @@ -1,5 +1,7 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ - test: {}, + test: { + testTimeout: 30000, + }, }); diff --git a/turbo.json b/turbo.json index 18f0065..56fa44a 100644 --- a/turbo.json +++ b/turbo.json @@ -17,7 +17,10 @@ "dev": { "cache": false }, - "test": {}, + "test": { + "env": ["CI"], + "outputs": [] + }, "check": {}, "clean": {} }