From 1fec91f45c1ce3f933cb151a6f7ee9e45f528958 Mon Sep 17 00:00:00 2001 From: jer3m01 Date: Fri, 3 May 2024 05:47:39 +0200 Subject: [PATCH] ci: split jobs --- .github/workflows/build.yml | 35 +++++++++++++++++++++++ .github/workflows/{tests.yml => test.yml} | 10 ++----- 2 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{tests.yml => test.yml} (81%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..db436ce2 --- /dev/null +++ b/.github/workflows/build.yml @@ -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/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: Build + run: pnpm build + env: + NODE_OPTIONS: "--max_old_space_size=4096" \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/test.yml similarity index 81% rename from .github/workflows/tests.yml rename to .github/workflows/test.yml index 15fdb9fb..5c2d9476 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Build and Test +name: Test on: pull_request: @@ -10,7 +10,7 @@ on: jobs: build: - name: Build and Test + name: Test runs-on: ubuntu-latest steps: - name: Checkout repo @@ -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: