Skip to content

Commit

Permalink
ci: split jobs and retry flaky tests (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3m01 authored May 3, 2024
1 parent fdf0dec commit 16e4a35
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/tests.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Build

on:
pull_request:
Expand All @@ -10,7 +10,7 @@ on:

jobs:
build:
name: Build and Test
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -33,9 +33,3 @@ jobs:
run: pnpm build
env:
NODE_OPTIONS: "--max_old_space_size=4096"

- name: Test
run: pnpm test
env:
CI: true
NODE_OPTIONS: "--max_old_space_size=4096"
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/[email protected]

- name: Setup Node.js 21.6.1
uses: actions/setup-node@v3
with:
node-version: 21.6.1
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Test
uses: nick-fields/retry@v3
with:
timeout_minutes: 2
max_attempts: 3
command: pnpm test
env:
CI: true
NODE_OPTIONS: "--max_old_space_size=4096"
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outputs": ["dist/**"]
},
"test": {
"dependsOn": ["^build"]
"dependsOn": ["@kobalte/tests#build", "@kobalte/utils#build"]
},
"typecheck": {
"cache": false
Expand Down

0 comments on commit 16e4a35

Please sign in to comment.