Skip to content

Commit 1e7265c

Browse files
Add frontend build job to PR workflow (#1099)
## Summary Adds a `frontend-build` job to the PR Build and Test workflow (`.github/workflows/PR-Build-And-Test.yml`) so that npm package and Vite build issues are caught on every PR before they reach the full build/deploy pipeline. ## Changes - New `frontend-build` job that: 1. Checks out the repo 2. Sets up Node.js 26 (matching the Dockerfile's `node:26-bookworm-slim`) 3. Caches npm dependencies via `package-lock.json` 4. Runs `npm ci` in `EssentialCSharp.Web/` 5. Runs `npm run build` (Vite build) in `EssentialCSharp.Web/` This mirrors the `frontend-build` stage in the Dockerfile exactly, ensuring PRs are validated against the same build path used in production. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
1 parent d074fee commit 1e7265c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/PR-Build-And-Test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
frontend-build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v6
17+
with:
18+
node-version: '26'
19+
cache: npm
20+
cache-dependency-path: EssentialCSharp.Web/package-lock.json
21+
22+
- name: Install npm dependencies
23+
working-directory: EssentialCSharp.Web
24+
run: npm ci
25+
26+
- name: Build frontend
27+
working-directory: EssentialCSharp.Web
28+
run: npm run build
29+
1030
build-and-test:
1131
runs-on: ubuntu-latest
1232
steps:

0 commit comments

Comments
 (0)