Skip to content

Commit 7cfe312

Browse files
committed
ci: switch workflows to Bun (setup action, bun run)
1 parent c106f42 commit 7cfe312

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff 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'

.github/workflows/performance-monitor.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,8 @@ jobs:
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
@@ -41,7 +36,7 @@ jobs:
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)
@@ -59,9 +54,11 @@ jobs:
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

0 commit comments

Comments
 (0)