From 3862bd96bd5d1083f702afba01abe1ab45d5e58b Mon Sep 17 00:00:00 2001 From: Jack Williams <1736957+jpwilliams@users.noreply.github.com> Date: Thu, 27 Jul 2023 13:31:07 +0100 Subject: [PATCH] Set Node version to build with --- .github/actions/setup-and-build/action.yml | 7 +++++-- .github/workflows/pr.yml | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-and-build/action.yml b/.github/actions/setup-and-build/action.yml index 2a424c37f..3135870b3 100644 --- a/.github/actions/setup-and-build/action.yml +++ b/.github/actions/setup-and-build/action.yml @@ -13,6 +13,9 @@ runs: using: composite steps: - uses: teaxyz/setup@v0 + +: | + nodejs.org~18 + github.com/antfu/ni - uses: pnpm/action-setup@v2 with: @@ -20,8 +23,8 @@ runs: - uses: actions/setup-node@v3 with: - node-version-file: 'package.json' - cache: 'pnpm' + node-version: lts/* + cache: pnpm - name: Install dependencies run: pnpm install diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 155d62f34..6a5d1e388 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,7 +29,7 @@ jobs: - 14 - 16 - 18 - - lts + - 20 steps: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-and-build @@ -138,12 +138,12 @@ jobs: # Don't use "npm ci", "--immutable" etc., as example repos won't be # shipped with lock files. - name: Install example dependencies - run: tea +github.com/antfu/ni ni + run: ni working-directory: examples/apps/${{ matrix.example }} - name: Add local SDK to example working-directory: examples/apps/${{ matrix.example }} - run: tea +github.com/antfu/ni ni ./inngest.tgz + run: ni ./inngest.tgz # Copy any SDK function examples to the example repo so that we're always # testing many functions against many handlers. @@ -165,7 +165,7 @@ jobs: # Try to build the example - name: Build the example - run: tea +github.com/antfu/ni nr build + run: nr build working-directory: examples/apps/${{ matrix.example }} - name: Run the Inngest dev server @@ -181,7 +181,7 @@ jobs: # Run the example - name: Run the example's dev server - run: (tea +github.com/antfu/ni nr dev > dev.log 2>&1 &) + run: (nr dev > dev.log 2>&1 &) working-directory: examples/apps/${{ matrix.example }} # Provide the example any env vars it might need env: