Skip to content

Commit 6ed1f48

Browse files
committed
Fix GitHub Actions workflow: proper pnpm setup and correct test coverage command
1 parent ef036f4 commit 6ed1f48

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,31 @@ jobs:
4141
uses: actions/setup-node@v4
4242
with:
4343
node-version: '20'
44-
cache: 'pnpm'
4544

46-
- name: Install pnpm
47-
run: npm install -g pnpm
45+
- name: Setup pnpm
46+
uses: pnpm/action-setup@v2
47+
with:
48+
version: 8
49+
run_install: false
50+
51+
- name: Get pnpm store directory
52+
shell: bash
53+
run: |
54+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
55+
56+
- name: Setup pnpm cache
57+
uses: actions/cache@v3
58+
with:
59+
path: ${{ env.STORE_PATH }}
60+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
61+
restore-keys: |
62+
${{ runner.os }}-pnpm-store-
4863
4964
- name: Install dependencies
5065
run: cd frontend && pnpm install
5166

5267
- name: Run tests with coverage
53-
run: cd frontend && pnpm test -- --coverage
68+
run: cd frontend && pnpm test:coverage
5469

5570
- name: Upload coverage report
5671
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **Step 01:** Initial repository scaffold, backend (Spring Boot) and frontend (React/Vite) skeletons, basic toolchain (Maven, pnpm, Vite, ESLint, Prettier, Spotless, Jacoco, Vitest), Husky pre-commit hooks, and GitHub Actions CI pipeline.
1313
- **Step 02:** Added public health endpoint.
1414
- **Step 03:** Guest UI skeleton with health fetch.
15+
16+
### Fixed
17+
18+
- Fixed GitHub Actions CI workflow to properly set up pnpm using the official pnpm action.
19+
- Fixed frontend test coverage command in CI workflow to use the correct `test:coverage` script.

0 commit comments

Comments
 (0)