Skip to content

Commit 5ef8179

Browse files
committed
Switch to pnpm
- needed to add some peer deps that we were missing - needed to prevent a compatible upgrade to markdown-link-extractor because it made node-tests hundreds of times slower
1 parent 4563b16 commit 5ef8179

File tree

5 files changed

+17619
-36928
lines changed

5 files changed

+17619
-36928
lines changed

.github/actions/setup/action.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Setup node and pnpm
2+
description: Setup node and install dependencies using pnpm
3+
inputs:
4+
use_lockfile:
5+
description: 'Whether to use the lockfile vs latest floating dependencies'
6+
required: false
7+
default: 'true'
8+
use_pinned_node:
9+
description: 'Whether to use the node version defined in .npmrc'
10+
required: false
11+
default: 'false'
12+
runs:
13+
using: 'composite'
14+
steps:
15+
- uses: pnpm/action-setup@v4
16+
name: Install pnpm
17+
with:
18+
run_install: false
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
cache: pnpm
23+
- run: pnpm install ${{ fromJSON('{"false":"--no-lockfile", "true":"--frozen-lockfile"}')[inputs.use_lockfile] }}
24+
shell: bash

.github/workflows/ci.yml

+7-35
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
pull_request:
88

99
env:
10-
NODE_VERSION: 20
1110
NODE_OPTIONS: '--max_old_space_size=4096'
1211

1312
jobs:
@@ -17,17 +16,8 @@ jobs:
1716
timeout-minutes: 7
1817
steps:
1918
- name: Check out a copy of the repo
20-
uses: actions/checkout@v3
21-
22-
- name: Use Node.js ${{ env.NODE_VERSION }}
23-
uses: actions/setup-node@v3
24-
with:
25-
cache: 'npm'
26-
node-version: ${{ env.NODE_VERSION }}
27-
28-
- run: npm i -g npm@9
29-
- run: npm ci
30-
19+
uses: actions/checkout@v4
20+
- uses: ./.github/actions/setup
3121
- name: Lint
3222
run: npm run lint
3323

@@ -37,17 +27,8 @@ jobs:
3727
timeout-minutes: 7
3828
steps:
3929
- name: Check out a copy of the repo
40-
uses: actions/checkout@v3
41-
42-
- name: Use Node.js ${{ env.NODE_VERSION }}
43-
uses: actions/setup-node@v3
44-
with:
45-
cache: 'npm'
46-
node-version: ${{ env.NODE_VERSION }}
47-
48-
- run: npm i -g npm@9
49-
- run: npm ci
50-
30+
uses: actions/checkout@v4
31+
- uses: ./.github/actions/setup
5132
- name: Test
5233
uses: percy/[email protected]
5334
with:
@@ -61,16 +42,7 @@ jobs:
6142
timeout-minutes: 7
6243
steps:
6344
- name: Check out a copy of the repo
64-
uses: actions/checkout@v2
65-
66-
- name: Use Node.js ${{ env.NODE_VERSION }}
67-
uses: actions/setup-node@v2
68-
with:
69-
cache: 'npm'
70-
node-version: ${{ env.NODE_VERSION }}
71-
72-
- run: npm i -g npm@9
73-
- run: npm ci
74-
45+
uses: actions/checkout@v4
46+
- uses: ./.github/actions/setup
7547
- name: Test
76-
run: npm run test:node
48+
run: pnpm run test:node

0 commit comments

Comments
 (0)