1010
1111env :
1212 NODE_VERSION : 20.18.1
13+ PNPM_VERSION : 10.8.1
1314
1415jobs :
1516 compile :
1617 runs-on : ubuntu-latest
1718 steps :
1819 - name : Checkout code
1920 uses : actions/checkout@v4
21+ - name : Install pnpm
22+ uses : pnpm/action-setup@v4
23+ with :
24+ version : ${{ env.PNPM_VERSION }}
2025 - name : Setup Node.js
2126 uses : actions/setup-node@v4
2227 with :
2328 node-version : ${{ env.NODE_VERSION }}
24- cache : ' npm '
29+ cache : ' pnpm '
2530 - name : Install dependencies
26- run : npm run install:all
27- - name : Compile
28- run : npm run compile
31+ run : pnpm install
2932 - name : Check types
30- run : npm run check-types
33+ run : pnpm check-types
3134 - name : Lint
32- run : npm run lint
35+ run : pnpm lint
3336
3437 check-translations :
3538 runs-on : ubuntu-latest
3639 steps :
3740 - name : Checkout code
3841 uses : actions/checkout@v4
42+ - name : Install pnpm
43+ uses : pnpm/action-setup@v4
44+ with :
45+ version : ${{ env.PNPM_VERSION }}
3946 - name : Setup Node.js
4047 uses : actions/setup-node@v4
4148 with :
42- node-version : ' 18 '
43- cache : ' npm '
49+ node-version : ${{ env.NODE_VERSION }}
50+ cache : ' pnpm '
4451 - name : Install dependencies
45- run : npm run install:all
52+ run : pnpm install
4653 - name : Verify all translations are complete
4754 run : node scripts/find-missing-translations.js
4855
@@ -51,15 +58,19 @@ jobs:
5158 steps :
5259 - name : Checkout code
5360 uses : actions/checkout@v4
61+ - name : Install pnpm
62+ uses : pnpm/action-setup@v4
63+ with :
64+ version : ${{ env.PNPM_VERSION }}
5465 - name : Setup Node.js
5566 uses : actions/setup-node@v4
5667 with :
57- node-version : ' 18 '
58- cache : ' npm '
68+ node-version : ${{ env.NODE_VERSION }}
69+ cache : ' pnpm '
5970 - name : Install dependencies
60- run : npm run install:all
71+ run : pnpm install
6172 - name : Run knip checks
62- run : npm run knip
73+ run : pnpm knip
6374
6475 test-extension :
6576 runs-on : ${{ matrix.os }}
@@ -69,19 +80,20 @@ jobs:
6980 steps :
7081 - name : Checkout code
7182 uses : actions/checkout@v4
83+ - name : Install pnpm
84+ uses : pnpm/action-setup@v4
85+ with :
86+ version : ${{ env.PNPM_VERSION }}
7287 - name : Setup Node.js
7388 uses : actions/setup-node@v4
7489 with :
7590 node-version : ${{ env.NODE_VERSION }}
76- cache : ' npm '
91+ cache : ' pnpm '
7792 - name : Install dependencies
78- run : npm run install:all
79- - name : Compile (to build and copy WASM files)
80- run : npm run compile
81- - name : Run jest unit tests
82- run : npx jest --silent
83- - name : Run vitest unit tests
84- run : npx vitest run --silent
93+ run : pnpm install
94+ - name : Run unit tests
95+ working-directory : src
96+ run : pnpm test
8597
8698 test-webview :
8799 runs-on : ${{ matrix.os }}
@@ -91,16 +103,20 @@ jobs:
91103 steps :
92104 - name : Checkout code
93105 uses : actions/checkout@v4
106+ - name : Install pnpm
107+ uses : pnpm/action-setup@v4
108+ with :
109+ version : ${{ env.PNPM_VERSION }}
94110 - name : Setup Node.js
95111 uses : actions/setup-node@v4
96112 with :
97- node-version : ' 18 '
98- cache : ' npm '
113+ node-version : ${{ env.NODE_VERSION }}
114+ cache : ' pnpm '
99115 - name : Install dependencies
100- run : npm run install:all
116+ run : pnpm install
101117 - name : Run unit tests
102118 working-directory : webview-ui
103- run : npx jest --silent
119+ run : pnpm test
104120
105121 unit-test :
106122 needs : [test-extension, test-webview]
@@ -131,16 +147,20 @@ jobs:
131147 steps :
132148 - name : Checkout code
133149 uses : actions/checkout@v4
150+ - name : Install pnpm
151+ uses : pnpm/action-setup@v4
152+ with :
153+ version : ${{ env.PNPM_VERSION }}
134154 - name : Setup Node.js
135155 uses : actions/setup-node@v4
136156 with :
137157 node-version : ${{ env.NODE_VERSION }}
138- cache : ' npm '
158+ cache : ' pnpm '
139159 - name : Install dependencies
140- run : npm run install:all
160+ run : pnpm install
141161 - name : Create .env.local file
142162 working-directory : e2e
143163 run : echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.local
144164 - name : Run integration tests
145165 working-directory : e2e
146- run : xvfb-run -a npm run ci
166+ run : xvfb-run -a pnpm test: ci
0 commit comments