Skip to content

Commit

Permalink
Set Node version to build with
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwilliams committed Jul 27, 2023
1 parent 2590f47 commit 3862bd9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/actions/setup-and-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ runs:
using: composite
steps:
- uses: teaxyz/setup@v0
+: |
nodejs.org~18
github.com/antfu/ni
- uses: pnpm/action-setup@v2
with:
run_install: false

- uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
cache: 'pnpm'
node-version: lts/*
cache: pnpm

- name: Install dependencies
run: pnpm install
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- 14
- 16
- 18
- lts
- 20
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-and-build
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 3862bd9

Please sign in to comment.