Skip to content

Commit 887bd23

Browse files
committed
ci: use pnpm lockfile for node setup and installs
1 parent 7f6b0fa commit 887bd23

1 file changed

Lines changed: 31 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,20 @@ jobs:
5454
with:
5555
bundler-cache: true
5656

57+
- name: Setup pnpm
58+
uses: pnpm/action-setup@v4
59+
with:
60+
cache: true
61+
cache_dependency_path: frontend/pnpm-lock.yaml
62+
package_json_file: frontend/package.json
63+
5764
- name: Setup Node.js for OpenAPI lint tooling
5865
uses: actions/setup-node@v6
5966
with:
6067
node-version-file: ".tool-versions"
61-
cache: npm
62-
cache-dependency-path: frontend/package-lock.json
6368

6469
- name: Install frontend dependencies for OpenAPI client verification
65-
run: npm ci
70+
run: pnpm install --frozen-lockfile
6671
working-directory: frontend
6772

6873
- name: Verify generated OpenAPI spec and client are up to date
@@ -79,36 +84,41 @@ jobs:
7984
steps:
8085
- uses: actions/checkout@v6
8186

87+
- name: Setup pnpm
88+
uses: pnpm/action-setup@v4
89+
with:
90+
cache: true
91+
cache_dependency_path: frontend/pnpm-lock.yaml
92+
package_json_file: frontend/package.json
93+
8294
- name: Setup Node.js
8395
uses: actions/setup-node@v6
8496
with:
8597
node-version-file: ".tool-versions"
86-
cache: npm
87-
cache-dependency-path: frontend/package-lock.json
8898

8999
- name: Install dependencies
90-
run: npm ci
100+
run: pnpm install --frozen-lockfile
91101

92102
- name: Typecheck frontend
93-
run: npm run typecheck
103+
run: pnpm run typecheck
94104

95105
- name: Lint CSS with Stylelint
96-
run: pnpm dlx stylelint "**/*.css" || npx stylelint "**/*.css"
106+
run: pnpm exec stylelint "**/*.css"
97107

98108
- name: Check formatting
99-
run: npm run format:check
109+
run: pnpm run format:check
100110

101111
- name: Audit dependencies
102112
run: npm audit --audit-level=moderate
103113

104114
- name: Run frontend tests
105-
run: npm run test:ci
115+
run: pnpm run test:ci
106116

107117
- name: Install Playwright Chromium
108-
run: npx playwright install --with-deps chromium
118+
run: pnpm exec playwright install --with-deps chromium
109119

110120
- name: Run frontend smoke test
111-
run: npm run test:e2e
121+
run: pnpm run test:e2e
112122

113123
docker-build-smoke-image:
114124
needs:
@@ -178,19 +188,24 @@ jobs:
178188
- name: Checkout code
179189
uses: actions/checkout@v6
180190

191+
- name: Setup pnpm
192+
uses: pnpm/action-setup@v4
193+
with:
194+
cache: true
195+
cache_dependency_path: frontend/pnpm-lock.yaml
196+
package_json_file: frontend/package.json
197+
181198
- name: Setup Node.js for Docker build
182199
uses: actions/setup-node@v6
183200
with:
184201
node-version-file: ".tool-versions"
185-
cache: npm
186-
cache-dependency-path: frontend/package-lock.json
187202

188203
- name: Install frontend dependencies
189-
run: npm ci
204+
run: pnpm install --frozen-lockfile
190205
working-directory: frontend
191206

192207
- name: Build frontend static assets
193-
run: npm run build
208+
run: pnpm run build
194209
working-directory: frontend
195210

196211
- name: Set up QEMU

0 commit comments

Comments
 (0)