test: added retries for ci
This commit is contained in:
parent
6fb2b652d3
commit
d0a7ba4300
2 changed files with 8 additions and 1 deletions
|
@ -18,6 +18,7 @@ export default mergeConfig(baseConfig, defineConfig({
|
|||
fakeTimers: {
|
||||
toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'Date']
|
||||
},
|
||||
retry: process.env.CI ? 3 : 0,
|
||||
// for whatever reason using exclude-s makes the vite never start the browser, so we use skip-s instead.
|
||||
// exclude: [
|
||||
// './packages/crypto-node/**',
|
||||
|
|
8
.github/workflows/test.yaml
vendored
8
.github/workflows/test.yaml
vendored
|
@ -57,7 +57,13 @@ jobs:
|
|||
- name: 'Initialize browser'
|
||||
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
|
||||
- name: 'Run tests'
|
||||
run: pnpm run test:browser --browser.name=${{ matrix.browser }}
|
||||
# i wish we didn't have to do this, but vitest in browser is very flaky
|
||||
# see: https://github.com/vitest-dev/vitest/issues/4173
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
max_attempts: 3
|
||||
timeout_minutes: 30
|
||||
command: pnpm run test:browser --browser.name=${{ matrix.browser }}
|
||||
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Reference in a new issue