ci: add format check job to CI workflow - #182
Conversation
| - name: Install dependencies | ||
| run: pnpm install --ignore-scripts | ||
| - name: Check formatting | ||
| run: pnpm run format:check |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 .f1d8a12 to
2688561
Compare
2688561 to
a857dba
Compare
* run biome in the ci * fix format
What
Adds a new
formatjob to the CI workflow that runspnpm run format:checkto verify code formatting using Biome.Changes
.github/workflows/tests.ymlto.github/workflows/ci.ymlformatjob that checks code formatting with BiomeWhy
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.