Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,32 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Build application
run: npm run build
run: bun run build

- name: Package application (macOS)
if: matrix.platform == 'mac'
run: npm run dist
run: bun run dist
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package application (Linux)
if: matrix.platform == 'linux'
run: npm run dist
run: bun run dist
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package application (Windows)
if: matrix.platform == 'windows'
run: npm run dist
run: bun run dist
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
33 changes: 16 additions & 17 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths:
- 'src/**'
- 'package.json'
- 'package-lock.json'
- 'bun.lockb'
- 'vite.config.ts'
- 'electron/**'

Expand All @@ -23,17 +23,16 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies (PR)
run: npm ci
run: bun install --frozen-lockfile

- name: Build application (PR)
run: npm run build
run: bun run build
Comment on lines +26 to +35
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Bun latest stable 1.x version and oven-sh/setup-bun recommended version pinning

💡 Result:

  • Latest stable Bun 1.x: Bun v1.3.6 (released January 13, 2026). [1]
  • oven-sh/setup-bun version pinning (recommended for CI reproducibility):
    • Pin the action to a major: uses: oven-sh/setup-bun@v2 (so you get fixes without breaking changes). [2]
    • Pin Bun via either:
      • an explicit version: bun-version: "1.3.6" (most reproducible), or [2]
      • a version file (recommended for keeping local + CI in sync): bun-version-file: ".bun-version" (also supports e.g. .tool-versions / package.json). [2]

Sources:
[1] GitHub Releases: oven-sh/bun (Bun v1.3.6 marked Latest) (github.com)
[2] oven-sh/setup-bun README / Marketplace usage + bun-version-file (github.com)

Citations:


🏁 Script executed:

git ls-files ".github/workflows/bundle-size.yml"

Repository: osama1998H/lume

Length of output: 92


🏁 Script executed:

cat -n .github/workflows/bundle-size.yml | sed -n '20,80p'

Repository: osama1998H/lume

Length of output: 2228


🏁 Script executed:

grep -n "setup-bun" .github/workflows/bundle-size.yml

Repository: osama1998H/lume

Length of output: 96


🏁 Script executed:

cat .github/workflows/bundle-size.yml | head -100

Repository: osama1998H/lume

Length of output: 2926


Pin Bun to a specific version for deterministic CI behavior.

Using bun-version: latest allows breaking changes to silently slip into CI runs without code changes. Pin to an explicit version such as "1.3.6" or use bun-version-file: ".bun-version" to sync with local development:

Example fix (line 29):
      - name: Setup Bun
        uses: oven-sh/setup-bun@v2
        with:
-         bun-version: latest
+         bun-version: "1.3.6"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest
- name: Install dependencies (PR)
run: npm ci
run: bun install --frozen-lockfile
- name: Build application (PR)
run: npm run build
run: bun run build
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.6"
- name: Install dependencies (PR)
run: bun install --frozen-lockfile
- name: Build application (PR)
run: bun run build
🤖 Prompt for AI Agents
In @.github/workflows/bundle-size.yml around lines 26 - 35, The "Setup Bun" step
currently uses bun-version: latest which makes CI non-deterministic; update the
setup action configuration in the workflow step named "Setup Bun" to pin a
specific Bun version (e.g., "1.3.6") or switch to using bun-version-file:
".bun-version" so CI matches local tooling; edit the step that uses
oven-sh/setup-bun@v2 (the "Setup Bun" step) to replace bun-version: latest with
a fixed version string or add bun-version-file to ensure repeatable builds.


- name: Get PR bundle size
id: pr-size
Expand Down Expand Up @@ -69,10 +68,10 @@ jobs:
- name: Install dependencies (Base)
run: |
rm -rf node_modules
npm ci
bun install --frozen-lockfile

- name: Build application (Base)
run: npm run build
run: bun run build

- name: Get base bundle size
id: base-size
Expand Down Expand Up @@ -117,17 +116,17 @@ jobs:
- name: Format size changes
id: format
run: |
# Function to format size difference with emoji
# Function to format size difference
format_diff() {
local diff=$1
local pct=$2

if [ $diff -gt 0 ]; then
echo "📈 +$(numfmt --to=iec-i --suffix=B $((diff * 1024))) (+${pct}%)"
echo "+$(numfmt --to=iec-i --suffix=B $((diff * 1024))) (+${pct}%)"
elif [ $diff -lt 0 ]; then
echo "📉 $(numfmt --to=iec-i --suffix=B $((diff * 1024))) (${pct}%)"
echo "$(numfmt --to=iec-i --suffix=B $((diff * 1024))) (${pct}%)"
else
echo "➡️ No change"
echo "No change"
fi
}

Expand Down Expand Up @@ -157,15 +156,15 @@ jobs:

const warnings = [];
if (totalDiff > 51200) {
warnings.push('⚠️ **Warning**: Total bundle size increased by more than 50MB!');
warnings.push('**Warning**: Total bundle size increased by more than 50MB!');
}
if (totalPct > 5) {
warnings.push('⚠️ **Warning**: Bundle size changed by more than 5%!');
warnings.push('**Warning**: Bundle size changed by more than 5%!');
}

const warningText = warnings.length > 0 ? '\n' + warnings.join('\n') : '';

const comment = `## 📦 Bundle Size Report
const comment = `## Bundle Size Report

| Component | Base | PR | Change |
|-----------|------|-----|--------|
Expand All @@ -174,7 +173,7 @@ jobs:
| **Total** | ${{ steps.totals.outputs.base }} | ${{ steps.totals.outputs.pr }} | ${{ steps.format.outputs.total }} |
${warningText}

<sub>🤖 This comment will be automatically updated on new commits</sub>`;
<sub>This comment will be automatically updated on new commits</sub>`;

// Find existing comment
const { data: comments } = await github.rest.issues.listComments({
Expand Down
65 changes: 30 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Run ESLint
run: npm run lint
run: bun run lint
continue-on-error: false

build:
Expand All @@ -36,20 +35,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Build React app
run: npm run build:react
run: bun run build:react

- name: Build Electron app
run: npm run build:electron
run: bun run build:electron

- name: Upload build artifacts
uses: actions/upload-artifact@v4
Expand All @@ -66,26 +64,25 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Build Electron (generate type declarations)
run: npm run build:electron
run: bun run build:electron

- name: Check React types
run: npx tsc --noEmit
run: bunx tsc --noEmit

- name: Check Electron types
run: npx tsc -p tsconfig.electron.json --noEmit
run: bunx tsc -p tsconfig.electron.json --noEmit

- name: Check MCP types
run: npx tsc -p tsconfig.mcp.json --noEmit
run: bunx tsc -p tsconfig.mcp.json --noEmit

test:
name: Run Tests
Expand All @@ -95,17 +92,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Run tests
run: npm run test
run: bun test
continue-on-error: true # Tests have configuration issues, don't fail CI for now

e2e-tests:
Expand All @@ -117,17 +113,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
run: bunx playwright install --with-deps chromium

- name: Download build artifacts
uses: actions/download-artifact@v5
Expand All @@ -136,7 +131,7 @@ jobs:
path: dist/

- name: Run E2E tests
run: npm run test:e2e
run: bun run test:e2e
env:
CI: true

Expand Down
23 changes: 5 additions & 18 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ jobs:
with:
fetch-depth: 0 # Required for coverage comparison

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
cache: 'npm'
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Run tests with coverage
run: npm run test -- --coverage --coverageReporters="text" --coverageReporters="lcov" --coverageReporters="json-summary"
run: bun test --coverage

- name: Upload coverage to Codecov
if: always()
Expand All @@ -51,18 +50,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true

- name: Check coverage threshold
if: always()
run: |
COVERAGE=$(node -p "require('./coverage/coverage-summary.json').total.lines.pct")
echo "Total coverage: $COVERAGE%"
if (( $(echo "$COVERAGE < 20" | bc -l) )); then
echo "⚠️ Coverage is below 20% threshold"
exit 1
else
echo "✅ Coverage meets 20% threshold"
fi

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
if: always()
Expand Down
Loading
Loading