Skip to content

Biome Ecosystem CI #299

Biome Ecosystem CI

Biome Ecosystem CI #299

Workflow file for this run

name: Biome Ecosystem CI
permissions:
contents: none
on:
schedule:
- cron: "0 5 * * 1,3,5" # monday,wednesday,friday 5AM
workflow_dispatch:
inputs:
biome-ref:
description: biomejs/biome reference to checkout
type: string
default: main
jobs:
build-biome:
name: Build Biome (${{ inputs.biome-ref || 'main' }})
timeout-minutes: 20
runs-on: depot-ubuntu-24.04-arm-64
steps:
- name: Checkout Biome
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: biomejs/biome
ref: ${{ inputs.biome-ref }}
- name: Install toolchain
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1
with:
cache-target: release
cache-base: main
- name: Build Biome binary
env:
# We set `BIOME_VERSION` to disable the recommended rules from the nursery group
# The version needs to be different from 0.0.0
BIOME_VERSION: 0.0.1
RUSTFLAGS: -C debug-assertions
run: |
cargo build --bin biome --release
- name: Upload Biome binary
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
if-no-files-found: error
retention-days: 10
name: biome
path: ./target/release/biome
test-ecosystem:
strategy:
fail-fast: false
matrix:
include:
# Add projects to test here
# Supported fields:
# - id: identifier
# - repository: GitHub repository to checkout
# - ref: ref to checkout (default is the default branch)
# - working-directory: where to execute `biome` (default is the root of the repository)
# The path is relative to the root of the repository
# - arguments: extra arguments to pass to the `biome check` command (default is `.`)
- id: ant-design
repository: ant-design/ant-design
- id: apify-crawlee
repository: apify/crawlee
arguments: --assist-enabled=false .
- id: ariakit
repository: ariakit/ariakit
- id: astro
repository: withastro/astro
- id: baidu-amis
repository: baidu/amis
working-directory: packages/office-viewer/
arguments: --assist-enabled=false .
- id: coder
repository: coder/coder
working-directory: site/
arguments: e2e/ src/
- id: discordjs
repository: discordjs/discord.js
- id: FluidFramework
repository: microsoft/FluidFramework
- id: farm-fe
repository: farm-fe/farm
- id: fiftyone-app
repository: voxel51/fiftyone
working-directory: app/packages/app/
arguments: ./src
- id: fiftyone-looker-3d
repository: voxel51/fiftyone
working-directory: app/packages/looker-3d/
arguments: ./src
- id: fiftyone-spotlight
repository: voxel51/fiftyone
working-directory: app/packages/spotlight/
arguments: ./src
- id: fontsource
repository: fontsource/fontsource
arguments: --assist-enabled=false .
- id: full-stack-fastapi-template
repository: fastapi/full-stack-fastapi-template
working-directory: frontend/
- id: google-mesop
repository: google/mesop
- id: knip
repository: webpro-nl/knip
- id: label-studio
repository: HumanSignal/label-studio
working-directory: web/
- id: max-mapper-menubar
repository: max-mapper/menubar
- id: melonJS
repository: melonjs/melonJS
- id: openapi-fetch
repository: openapi-ts/openapi-typescript
working-directory: packages/openapi-fetch/
- id: openapi-react-query
repository: openapi-ts/openapi-typescript
working-directory: packages/openapi-react-query/
- id: openapi-typescript-helpers
repository: openapi-ts/openapi-typescript
working-directory: packages/openapi-typescript-helpers/
- id: pulumi
repository: pulumi/pulumi
working-directory: sdk/nodejs/
- id: preact
repository: preactjs/preact
- id: react-data-grid
repository: adazzle/react-data-grid
- id: react-pdf
repository: wojtekmaj/react-pdf
arguments: --assist-enabled=false .
- id: refine
repository: refinedev/refine
- id: rescript-compiler
repository: rescript-lang/rescript-compiler
- id: rspack
repository: web-infra-dev/rspack
- id: runtipi
repository: runtipi/runtipi
- id: spicetify
repository: spicetify/cli
- id: steven-tey-novel-headless
repository: steven-tey/novel
working-directory: packages/headless/
- id: steven-tey-novel-web
repository: steven-tey/novel
working-directory: apps/web/
arguments: --assist-enabled=false .
- id: tamagui
repository: tamagui/tamagui
- id: unleash
repository: Unleash/unleash
- id: wagmi
repository: wevm/wagmi
name: Test ${{ matrix.id }}
needs: build-biome
timeout-minutes: 5
runs-on: depot-ubuntu-24.04-arm-16
steps:
- name: Download Biome binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: biome
path: bin/
- run: |
chmod +x bin/biome
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Checkout ${{ matrix.repository }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: ${{ matrix.repository }}
sparse-checkout: ${{ matrix.working-directory }}
ref: ${{ matrix.ref }}
path: repository
- name: Migrate
working-directory: repository/${{ matrix.working-directory }}
run: |
biome migrate --write
- name: Test details
if: ${{ ! cancelled() }}
id: test
continue-on-error: true
working-directory: repository/${{ matrix.working-directory }}
run: |
biome check --error-on-warnings --max-diagnostics=1000 ${{ matrix.arguments || '.' }}
- name: Generate JSON report
if: ${{ ! cancelled() }}
working-directory: repository/${{ matrix.working-directory }}
run: >
biome check --reporter=json --max-diagnostics=0 ${{ matrix.arguments || '.' }} 2>/dev/null
| tee "$GITHUB_WORKSPACE/biome-report.json" || true;
- name: Upload Biome report
# Don't save the report if the biome binary was not built on main.
if: ${{ always() && (! inputs.biome-ref || inputs.biome-ref == 'main') }}
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
if-no-files-found: error
retention-days: 10
name: biome-report-${{ matrix.id }}
path: biome-report.json
- name: Save outcome JSON
if: ${{ always() }}
run: |
cat > outcome.json <<EOF
{
"id": "${{ matrix.id }}",
"outcome": "${{ steps.test.outcome }}"
}
EOF
- name: Upload outcome
if: ${{ always() }}
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
if-no-files-found: error
retention-days: 1
name: outcome-${{ matrix.id }}
path: outcome.json
notify-discord:
name: Notify Discord
needs: test-ecosystem
if: ${{ always() }}
runs-on: depot-ubuntu-24.04-arm-16
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "24"
- name: Download all outcome artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: outcome-*
path: outcomes/
- name: Download all biome report artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: biome-report-*
path: reports/
- name: Download previous biome report artifacts
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6.0.0
with:
workflow_conclusion: completed
search_artifacts: true
if_no_artifact_found: warn
name_is_regexp: true
name: biome-report-.*
path: previous-reports/
- name: Aggregate results
id: aggregate
run: |
MESSAGE=$(node scripts/aggregate-outcomes.js \
--outcomes-dir outcomes \
--reports-dir reports \
--previous-reports-dir previous-reports \
--biome-ref "${{ inputs.biome-ref || 'main' }}" \
--run-url "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}")
# Use heredoc to handle multiline output
{
echo 'message<<EOF'
echo "$MESSAGE"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Send Discord notification
uses: tsickert/discord-webhook@86dc739f3f165f16dadc5666051c367efa1692f4 # v6.0.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: ${{ steps.aggregate.outputs.message }}