File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed
Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ echo " Validating package-lock.json sync with package.json..."
5+
6+ log_file=" $( mktemp) "
7+
8+ if npm ci --dry-run --ignore-scripts --no-audit --fund=false --loglevel=error > " $log_file " 2>&1 ; then
9+ echo " package-lock.json is in sync with package.json."
10+ rm -f " $log_file "
11+ exit 0
12+ fi
13+
14+ echo " ::error::package-lock.json is out of sync with package.json. Run npm install locally and commit the updated package-lock.json."
15+ echo " npm ci --dry-run output (last 30 lines):"
16+ tail -n 30 " $log_file " || true
17+ rm -f " $log_file "
18+ exit 1
Original file line number Diff line number Diff line change 2828 node-version : ' 20'
2929 cache : ' npm'
3030
31+ - name : Validate package-lock sync
32+ run : bash .github/scripts/validate-lockfile-sync.sh
33+
3134 - name : Install dependencies
3235 run : npm ci
3336
Original file line number Diff line number Diff line change 2424 node-version : ' 20'
2525 cache : ' npm'
2626
27+ - name : Validate package-lock sync
28+ run : bash .github/scripts/validate-lockfile-sync.sh
29+
2730 - name : Run Cypress E2E Tests
2831 uses : cypress-io/github-action@v6
2932 with :
4043 with :
4144 name : cypress-screenshots
4245 path : cypress/screenshots
43- if-no-files-found : ignore
46+ if-no-files-found : ignore
Original file line number Diff line number Diff line change 2626 with :
2727 node-version : ' 20'
2828
29+ - name : Validate package-lock sync
30+ run : bash .github/scripts/validate-lockfile-sync.sh
31+
2932 - name : Install Dependencies
3033 run : npm install
3134
You can’t perform that action at this time.
0 commit comments