Skip to content

持续集成

在 CI 环境中运行 Biome 很容易。查看 以了解哪些编辑器支持 Biome。

¥Running Biome in a CI environment is easy. Check out the following examples for some inspiration.

我们提供第一方 GitHub 操作 来在你的运行器中设置 Biome。以下是简单的工作流程可能的外观:

¥We provide a first-party GitHub Action to setup Biome in your runner. Here’s what a simple workflow might look like:

pull_request.yml
name: Code quality
on:
push:
pull_request:
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .

¥Third-party actions

这些是其他社区维护的操作,你可以在运行器中使用:

¥These are actions maintained by other communities, that you use in your runner:

pull_request.yml
name: reviewdog
on: [pull_request]
jobs:
biome:
name: runner / Biome
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: mongolyy/reviewdog-action-biome@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review