Skip to content

👷 ci: add Biome linting job to CI workflow#5

Merged
MarcelOlsen merged 4 commits intomasterfrom
ci/biome-linting-integration
Jun 16, 2025
Merged

👷 ci: add Biome linting job to CI workflow#5
MarcelOlsen merged 4 commits intomasterfrom
ci/biome-linting-integration

Conversation

@MarcelOlsen
Copy link
Owner

@MarcelOlsen MarcelOlsen commented Jun 16, 2025

Summary by CodeRabbit

  • Chores
    • Added automated linting and formatting checks to the continuous integration workflow to improve code quality.
    • Updated formatting configuration to use tabs for JSON files.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Alright, chat, listen up! The CI pipeline just got a little more giga-chad: now there’s a brand new linting job in the GitHub Actions workflow, running Biome lint and format checks with Bun. The original bun-tests job is still there, just moved down a bit and locked to Bun v1.2.16 consistently. Also, JSON files got their own formatter config with tab indentation in biome.json. Package.json? Just got tabbed out, no logic changed.

Changes

File(s) Change Summary
.github/workflows/ci.yml Added linting job for Biome lint/format checks, reordered bun-tests job, fixed Bun install version and commands, updated cache keys.
biome.json Added new "json" formatter config with "indentStyle": "tab".
package.json Reformatted indentation from spaces to tabs, no content 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
Loading

Possibly related PRs

Poem

Yo, the CI’s got a brand new flow,
Lint and test, now watch it go!
Tabs for JSON, Bun locked tight,
Formatting clean, code shining bright.
Push that code, no time to stall—
We’re coding legends, standing tall!
🚀🔥💻


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 709f5c0 and dc09ac1.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml (1 hunks)
  • biome.json (1 hunks)
  • package.json (1 hunks)

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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 static bun-v1.3.3 key. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4359721 and 709f5c0.

📒 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 both main and master – 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.
Using actions/checkout@v3 is rock-solid and standard.


29-33: 🔍 Verify Bun install flags
You’re piping the install script directly – classic move! Double-check that bash -s -- --version 1.3.3 is the officially recommended invocation.


34-36: 🛣️ PATH magic looks good.
Appending $HOME/.bun/bin to GITHUB_PATH – straightforward and solid.


37-42: 🎯 Biome check boss mode!
bun biome check should 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"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

🔥 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.

Suggested change
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.

@MarcelOlsen MarcelOlsen merged commit dfc750f into master Jun 16, 2025
2 checks passed
@MarcelOlsen MarcelOlsen deleted the ci/biome-linting-integration branch June 16, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant