Skip to content

Commit

Permalink
ci: split jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3m01 committed May 3, 2024
1 parent 87fb41d commit 1fec91f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build

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

jobs:
build:
name: Build
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: Build
run: pnpm build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
10 changes: 3 additions & 7 deletions .github/workflows/tests.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Test

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

jobs:
build:
name: Build and Test
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -29,14 +29,10 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
env:
NODE_OPTIONS: "--max_old_space_size=4096"

- name: Test
uses: nick-fields/retry@v3
with:
timeout_minutes: 2
max_attempts: 3
command: pnpm test
env:
Expand Down

0 comments on commit 1fec91f

Please sign in to comment.