👷 ci: add Biome linting job to CI workflow#5
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAlright, chat, listen up! The CI pipeline just got a little more giga-chad: now there’s a brand new Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Linting Job
participant Bun-Tests Job
GitHub Actions->>Linting Job: Trigger on push/pull_request
Linting Job->>Linting Job: Checkout code
Linting Job->>Linting Job: Cache Bun v1.2.16
Linting Job->>Linting Job: Install Bun v1.2.16 if missing
Linting Job->>Linting Job: Add Bun to PATH
Linting Job->>Linting Job: Install dependencies
Linting Job->>Linting Job: Run `bunx biome check`
GitHub Actions->>Bun-Tests Job: Start after linting
Bun-Tests Job->>Bun-Tests Job: Checkout code
Bun-Tests Job->>Bun-Tests Job: Cache Bun v1.2.16
Bun-Tests Job->>Bun-Tests Job: Verify Bun version
Bun-Tests Job->>Bun-Tests Job: Install Bun v1.2.16 if missing
Bun-Tests Job->>Bun-Tests Job: Add Bun to PATH
Bun-Tests Job->>Bun-Tests Job: Install dependencies
Bun-Tests Job->>Bun-Tests Job: Run tests
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
22-28: ⚡️ Juice that cache key for even more speed!
Right now it’s a staticbun-v1.3.3key. Consider including the runner OS or dependency hash to avoid collisions and future-proof your cache:- key: bun-v1.3.3 + key: ${{ runner.os }}-bun-v1.3.3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/ci.yml
20-20: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
23-23: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
49-49: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
52-52: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (6)
.github/workflows/ci.yml (6)
4-11: 💥 Trigger blast off! Event filters look solid.
Push and PR on bothmainandmaster– covers all your bases!
14-17: 🚀 Epic addition: Biome linting job rocking the CI!
Love seeing a dedicated linting & formatting step with Bun + Biome in its own job.
19-21: ✅ Checkout step locked in.
Usingactions/checkout@v3is rock-solid and standard.
29-33: 🔍 Verify Bun install flags
You’re piping the install script directly – classic move! Double-check thatbash -s -- --version 1.3.3is the officially recommended invocation.
34-36: 🛣️ PATH magic looks good.
Appending$HOME/.bun/bintoGITHUB_PATH– straightforward and solid.
37-42: 🎯 Biome check boss mode!
bun biome checkshould cover both lint and format rules. If you need separate invocations for stricter formatting enforcement (biome fmt --check), let me know!
| - name: Install Bun v1.3.3 | ||
| if: steps.bun-cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.16" |
There was a problem hiding this comment.
🔥 Critical: Fix Bun install syntax & version drift in bun-tests job.
You’re using bash -s "bun-v1.2.16" which won’t pass the --version flag, and it mismatches your cache key (v1.3.3). Let’s unify on v1.3.3 and correct the invocation:
- curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.16"
+ curl -fsSL https://bun.sh/install | bash -s -- --version 1.3.3📝 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.
| curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.16" | |
| curl -fsSL https://bun.sh/install | bash -s -- --version 1.3.3 |
🤖 Prompt for AI Agents
In .github/workflows/ci.yml at line 61, the Bun install command uses incorrect
syntax and an outdated version "bun-v1.2.16" that does not match the cache key
version "v1.3.3". Update the command to use the correct syntax for passing the
version flag and unify the version to "v1.3.3" to ensure consistency and proper
caching.
Summary by CodeRabbit