Skip to content

Commit

Permalink
read pnpm version from package.json and update node.js in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Jun 7, 2023
1 parent b025d63 commit 02f9c8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
12 changes: 2 additions & 10 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,17 @@ runs:
steps:
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7.12.1

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm

- name: Configure corepack
if: ${{ inputs.enable-corepack == 'true' }}
shell: bash
# Forcibly upgrade our available version of corepack.
# The bundled version in node 16 has known issues.
# Prepends the npm bin dir so that it is always first.
run: |
npm install --force --global corepack@latest
npm config get prefix >> $GITHUB_PATH
corepack enable
run: corepack enable

- name: pnpm install
id: install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nextjs-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
strategy:
matrix:
node: [16]
node: [18]

steps:
- uses: actions/cache/restore@v3
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ jobs:
# work out of box. We should take another stab at it later.
- name: Setup Pnpm
uses: pnpm/[email protected]
with:
version: 7.2.1

- name: Make sure pnpm always has a cache
shell: bash
Expand All @@ -398,7 +396,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: ${{ matrix.manager }}
cache-dependency-path: package.json

Expand Down Expand Up @@ -851,7 +849,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: 16
node-version: 18

- name: Build benchmarks for tests
timeout-minutes: 120
Expand Down Expand Up @@ -917,7 +915,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: 16
node-version: 18

- name: Build benchmarks for tests
timeout-minutes: 120
Expand Down

0 comments on commit 02f9c8a

Please sign in to comment.