Skip to content

ci: add format check job to CI workflow - #182

Merged
Rodriguespn merged 2 commits into
mainfrom
add-format-check-ci
Nov 20, 2025
Merged

ci: add format check job to CI workflow#182
Rodriguespn merged 2 commits into
mainfrom
add-format-check-ci

Conversation

@Rodriguespn

Copy link
Copy Markdown
Contributor

What

Adds a new format job to the CI workflow that runs pnpm run format:check to verify code formatting using Biome.

Changes

  • Renamed .github/workflows/tests.yml to .github/workflows/ci.yml
  • Added format job that checks code formatting with Biome
  • Format job runs only on pull requests (not on push to main)
  • Format job runs in parallel with the existing test job

Why

This ensures all PRs are properly formatted before merging. The format check only runs on pull requests so we can always run the full test suite against main after merging without the format check overhead.

Comment thread .github/workflows/ci.yml Outdated
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Check formatting
run: pnpm run format:check

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's preferred to run biome ci like we do in infrastructure. Currently this runs biome check.

Biome offers two CLI commands to run all checks: biome check and biome ci, however the latter should be used in CI (Continuous Integration) environments.

https://biomejs.dev/recipes/continuous-integration/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, consider using the official GitHub Action for setting up biome (see infrastructure biome.yml for reference)

https://biomejs.dev/recipes/continuous-integration/#github-actions

@Rodriguespn Rodriguespn Nov 20, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thx for the heads up @mattrossman. I'm not used to work with Biome so I wasn't aware of the difference between biome check and biome ci. I've checked infra biome.yml but decided to go with something closer to Biome ci official docs

name: Code quality

on:
  pull_request:

jobs:
  quality:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - name: Checkout
        uses: actions/checkout@v5
        with:
          persist-credentials: false
      - name: Setup Biome
        uses: biomejs/setup-biome@v2
      - name: Run Biome
        run: biome ci .

@mattrossman mattrossman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@Rodriguespn
Rodriguespn merged commit da79165 into main Nov 20, 2025
3 checks passed
Rodriguespn added a commit that referenced this pull request Dec 31, 2025
* run biome in the ci

* fix format
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.

2 participants