99
1010env :
1111 NODE_VERSION : ' 20'
12+ PNPM_VERSION : ' 9.15.1'
1213
1314jobs :
1415 # ===========================================================================
@@ -24,16 +25,19 @@ jobs:
2425 uses : actions/setup-node@v4
2526 with :
2627 node-version : ${{ env.NODE_VERSION }}
27- cache : ' npm'
28+ cache : ' pnpm'
29+
30+ - name : Enable pnpm
31+ run : corepack prepare pnpm@${{ env.PNPM_VERSION }} --activate
2832
2933 - name : Install dependencies
30- run : npm ci
34+ run : pnpm install --frozen-lockfile
3135
3236 - name : TypeScript check
33- run : npx tsc --noEmit
37+ run : pnpm exec tsc --noEmit
3438
3539 - name : Build
36- run : npm run build
40+ run : pnpm run build
3741
3842 unit-tests :
3943 name : Unit Tests
@@ -60,13 +64,16 @@ jobs:
6064 uses : actions/setup-node@v4
6165 with :
6266 node-version : ${{ env.NODE_VERSION }}
63- cache : ' npm'
67+ cache : ' pnpm'
68+
69+ - name : Enable pnpm
70+ run : corepack prepare pnpm@${{ env.PNPM_VERSION }} --activate
6471
6572 - name : Install dependencies
66- run : npm ci
73+ run : pnpm install --frozen-lockfile
6774
6875 - name : Run unit tests
69- run : npm run test:unit
76+ run : pnpm run test:unit
7077 env :
7178 POSTGRES_HOST : localhost
7279 POSTGRES_PORT : 5433
@@ -97,10 +104,13 @@ jobs:
97104 uses : actions/setup-node@v4
98105 with :
99106 node-version : ${{ env.NODE_VERSION }}
100- cache : ' npm'
107+ cache : ' pnpm'
108+
109+ - name : Enable pnpm
110+ run : corepack prepare pnpm@${{ env.PNPM_VERSION }} --activate
101111
102112 - name : Install dependencies
103- run : npm ci
113+ run : pnpm install --frozen-lockfile
104114
105115 - name : Create test environment
106116 run : |
@@ -128,19 +138,19 @@ jobs:
128138
129139 - name : Run Anthropic E2E
130140 if : matrix.provider == 'anthropic'
131- run : npx ts-node tests/e2e/providers/anthropic.test.ts
141+ run : pnpm exec ts-node tests/e2e/providers/anthropic.test.ts
132142 env :
133143 ANTHROPIC_API_KEY : ${{ secrets.ANTHROPIC_API_KEY }}
134144
135145 - name : Run OpenAI E2E
136146 if : matrix.provider == 'openai'
137- run : npx ts-node tests/e2e/providers/openai.test.ts
147+ run : pnpm exec ts-node tests/e2e/providers/openai.test.ts
138148 env :
139149 OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
140150
141151 - name : Run Gemini E2E
142152 if : matrix.provider == 'gemini'
143- run : npx ts-node tests/e2e/providers/gemini.test.ts
153+ run : pnpm exec ts-node tests/e2e/providers/gemini.test.ts
144154 env :
145155 GEMINI_API_KEY : ${{ secrets.GEMINI_API_KEY }}
146156
@@ -160,10 +170,13 @@ jobs:
160170 uses : actions/setup-node@v4
161171 with :
162172 node-version : ${{ env.NODE_VERSION }}
163- cache : ' npm'
173+ cache : ' pnpm'
174+
175+ - name : Enable pnpm
176+ run : corepack prepare pnpm@${{ env.PNPM_VERSION }} --activate
164177
165178 - name : Install dependencies
166- run : npm ci
179+ run : pnpm install --frozen-lockfile
167180
168181 - name : Create test environment
169182 run : |
@@ -175,7 +188,7 @@ jobs:
175188 EOF
176189
177190 - name : Run Agent Integration Tests
178- run : npx ts-node tests/integration/agent/ci-integration.test.ts
191+ run : pnpm exec ts-node tests/integration/agent/ci-integration.test.ts
179192 env :
180193 ANTHROPIC_API_KEY : ${{ secrets.ANTHROPIC_API_KEY }}
181194
@@ -195,10 +208,13 @@ jobs:
195208 uses : actions/setup-node@v4
196209 with :
197210 node-version : ${{ env.NODE_VERSION }}
198- cache : ' npm'
211+ cache : ' pnpm'
212+
213+ - name : Enable pnpm
214+ run : corepack prepare pnpm@${{ env.PNPM_VERSION }} --activate
199215
200216 - name : Install dependencies
201- run : npm ci
217+ run : pnpm install --frozen-lockfile
202218
203219 - name : Create test environment
204220 run : |
@@ -209,7 +225,7 @@ jobs:
209225 EOF
210226
211227 - name : Run Comprehensive Agent Tests
212- run : npx ts-node --transpileOnly tests/integration/agent/ci-agent.test.ts
228+ run : pnpm exec ts-node --transpileOnly tests/integration/agent/ci-agent.test.ts
213229 env :
214230 ANTHROPIC_API_KEY : ${{ secrets.ANTHROPIC_API_KEY }}
215231
0 commit comments