File tree Expand file tree Collapse file tree 2 files changed +11
-19
lines changed
Expand file tree Collapse file tree 2 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,11 @@ jobs:
2222 steps :
2323 - uses : actions/checkout@v4
2424
25- - name : Setup Node
26- uses : actions/setup-node@v6
27- with :
28- node-version : ' lts/*'
29-
30- - name : Install dependencies
31- run : npm ci || npm install --no-audit --no-fund
25+ - name : Setup Bun & install deps
26+ uses : ./.github/actions/setup-bun
3227
3328 - name : Run CI pipeline
34- run : npm run ci
29+ run : bun run ci
3530
3631 - name : Dependency Review
3732 if : github.event_name == 'pull_request'
Original file line number Diff line number Diff line change 2222 - name : Checkout code
2323 uses : actions/checkout@v4
2424
25- - name : Setup Node
26- uses : actions/setup-node@v6
27- with :
28- node-version : ' lts/*'
29-
30- - name : Install dependencies
31- run : npm ci || npm install --no-audit --no-fund
25+ - name : Setup Bun & install deps
26+ uses : ./.github/actions/setup-bun
3227
3328
3429 - name : Build and measure performance
4136 # Measure build time
4237 echo "Starting build measurement..." >> performance-report.txt
4338 start_time=$(date +%s%N)
44- npm run build
39+ bun run build
4540 end_time=$(date +%s%N)
4641 build_time_ms=$(( (end_time - start_time) / 1000000 ))
4742 build_time_s=$(echo "scale=2; $build_time_ms / 1000" | bc -l)
5954 echo "Files in bundle: $file_count" >> performance-report.txt
6055 fi
6156
62- # Check dependency count
63- dep_count=$(npm ls --all --json 2>/dev/null | jq -r '.. | objects | select(has("version")) | .name' | wc -l || echo "N/A")
64- echo "Dependencies: $dep_count packages" >> performance-report.txt
57+ # Check dependency count (sum of declared deps in package.json)
58+ if command -v jq >/dev/null 2>&1; then
59+ dep_count=$(jq '[.dependencies // {}, .devDependencies // {}, .optionalDependencies // {}] | add | length' package.json)
60+ echo "Dependencies (declared): $dep_count" >> performance-report.txt
61+ fi
6562
6663 # Check node_modules size
6764 if [ -d "node_modules" ]; then
You can’t perform that action at this time.
0 commit comments