Skip to content

Commit a327d7a

Browse files
committed
fix: set up pnpm before enabling Actions cache
1 parent 5d049e2 commit a327d7a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/cli/commands/ci.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ jobs:
214214
- name: Checkout
215215
uses: actions/checkout@v6
216216
217-
- name: Setup Node.js
217+
${setupPmStep} - name: Setup Node.js
218218
uses: actions/setup-node@v6
219219
with:
220220
node-version: ${yamlSingleQuoted(nodeVersion)}
221221
cache: '${pm.cacheKey}'
222222
223-
${setupPmStep} - name: Install dependencies
223+
- name: Install dependencies
224224
run: ${pm.installCmd}
225225
226226
- name: Setup SSH agent

tests/unit/ci-github.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ describe('ci github', () => {
5959
expect(workflow).toContain('uses: actions/checkout@v6');
6060
expect(workflow).toContain('uses: actions/setup-node@v6');
6161
expect(workflow).toContain('uses: pnpm/action-setup@v6');
62+
expect(workflow.indexOf('uses: pnpm/action-setup@v6')).toBeLessThan(
63+
workflow.indexOf('uses: actions/setup-node@v6'),
64+
);
6265
expect(workflow).not.toContain('paths:');
6366
expect(workflow).not.toContain('working-directory:');
6467
expect(workflow).not.toContain('- name: Build');

0 commit comments

Comments
 (0)