Make unit tests an explicit CI step; bump Node, add npm cache
- Dedicated 'Run unit tests' step (npm run test:unit) so unit tests are visible and guaranteed in CI rather than implied by the build script. - Build now calls react-scripts build directly, avoiding a redundant second Jest run (CI=true still fails the build on lint warnings). - Bump Node 18 (EOL) -> 20 and enable npm dependency caching. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -14,10 +14,11 @@ jobs:
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run tests
|
||||
run: npm test -- --runInBand
|
||||
- name: Run unit tests
|
||||
run: npm run test:unit
|
||||
- name: Build production bundle
|
||||
run: npm run build
|
||||
run: npx react-scripts build
|
||||
|
||||
Reference in New Issue
Block a user