diff --git a/.github/workflows/tests.yml b/.github/workflows/build.yml similarity index 77% rename from .github/workflows/tests.yml rename to .github/workflows/build.yml index 6154e855..189a0209 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build and Test +name: Build on: pull_request: @@ -10,7 +10,7 @@ on: jobs: build: - name: Build and Test + name: Build runs-on: ubuntu-latest steps: - name: Checkout repo @@ -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" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..5c2d9476 --- /dev/null +++ b/.github/workflows/test.yml @@ -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/action-setup@v2.4.0 + + - 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" diff --git a/turbo.json b/turbo.json index b6d81806..f7333105 100644 --- a/turbo.json +++ b/turbo.json @@ -7,7 +7,7 @@ "outputs": ["dist/**"] }, "test": { - "dependsOn": ["^build"] + "dependsOn": ["@kobalte/tests#build", "@kobalte/utils#build"] }, "typecheck": { "cache": false