From 5fe26403e2e95666abcd54d8016e818d5db3d869 Mon Sep 17 00:00:00 2001 From: Victorien Elvinger Date: Mon, 19 Aug 2024 17:48:27 +0200 Subject: [PATCH] ci(workflow): add minimal CI workflow --- .github/workflows/ecosystem-ci.yml | 147 +++++++++++++++++++++++++++++ README.md | 4 +- 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ecosystem-ci.yml diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml new file mode 100644 index 0000000..0da6eea --- /dev/null +++ b/.github/workflows/ecosystem-ci.yml @@ -0,0 +1,147 @@ +name: Biome Ecosystem CI + +on: + schedule: + - cron: "0 5 * * 1,3,5" # monday,wednesday,friday 5AM + + workflow_dispatch: + inputs: + ref: + type: string + default: main + +jobs: + build-biome: + name: Build Biome (${{ inputs.ref }}) + timeout-minutes: 20 + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout Biome + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + repository: biomejs/biome + ref: ${{ inputs.ref }} + + - name: Install toolchain + uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1 + with: + cache-target: release + cache-base: main + + - name: Build Biome binary + # We set `BIOME_VERSION` to disable the recommended rules from the nursery group + run: BIOME_VERSION=0.0.0 cargo build --bin biome --profile release-with-debug + + - name: Upload Biome binary + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 + with: + if-no-files-found: error + name: biome + path: ./target/release-with-debug/biome + + test-ecosystem: + strategy: + fail-fast: false + matrix: + include: + # Add projects to test here + # Supported fields: + # - repository: GitHub repository to checkout + # - ref: ref to checkout (default is the default branch) + # - command: command to execute (default is `biome check`) + # - working-directory: where to execute the command (default is the root of the repository) + # The path is relative to the root of the repository + - repository: ant-design/ant-design + - repository: withastro/astro + - repository: getsentry/sentry + - repository: preactjs/preact + - repository: saadeghi/daisyui + - repository: refinedev/refine + - repository: discordjs/discord.js + - repository: pulumi/pulumi + working-directory: sdk/nodejs/ + - repository: HumanSignal/label-studio + working-directory: web/ + - repository: plotly/plotly.js + - repository: fastapi/full-stack-fastapi-template + working-directory: frontend/ + - repository: spicetify/cli + - repository: apify/crawlee + command: biome check --organize-imports-enabled=false --max-diagnostics=200 . + - repository: baidu/amis + working-directory: packages/office-viewer/ + command: biome check --organize-imports-enabled=false --max-diagnostics=200 . + - repository: steven-tey/novel + working-directory: apps/web/ + command: biome check --organize-imports-enabled=false --max-diagnostics=200 . + - repository: steven-tey/novel + working-directory: packages/headless/ + - repository: Unleash/unleash + - repository: tamagui/tamagui + - repository: runtipi/runtipi + - repository: voxel51/fiftyone + working-directory: app/packages/app/ + command: biome check --max-diagnostics=200 ./src + - repository: voxel51/fiftyone + working-directory: app/packages/spotlight/ + command: biome check --max-diagnostics=200 ./src + - repository: voxel51/fiftyone + working-directory: app/packages/looker-3d/ + command: biome check --max-diagnostics=200 ./src + - repository: rescript-lang/rescript-compiler + - repository: adazzle/react-data-grid + - repository: webpro-nl/knip + - repository: wevm/wagmi + - repository: melonjs/melonJS + - repository: unjs/nitro + - repository: max-mapper/menubar + - repository: wojtekmaj/react-pdf + command: biome check --organize-imports-enabled=false --max-diagnostics=200 . + - repository: getsentry/sentry-javascript + - repository: askorama/orama + command: biome check --organize-imports-enabled=false --max-diagnostics=200 . + - repository: ariakit/ariakit + - repository: coder/coder + working-directory: site/ + command: biome check --max-diagnostics=200 e2e/ src/ + - repository: google/mesop + - repository: openapi-ts/openapi-typescript + working-directory: packages/openapi-fetch/ + - repository: openapi-ts/openapi-typescript + working-directory: packages/openapi-react-query/ + - repository: openapi-ts/openapi-typescript + working-directory: packages/openapi-typescript-helpers/ + - repository: fontsource/fontsource + command: biome check --organize-imports-enabled=false --max-diagnostics=200 . + - repository: farm-fe/farm + - repository: microsoft/FluidFramework + - repository: web-infra-dev/rspack + + name: Test ${{ matrix.repository }} ${{ matrix.ref }} ${{ matrix.working-directory }} + needs: build-biome + timeout-minutes: 20 + runs-on: ubuntu-latest + permissions: + contents: none + 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 }} + ref: ${{ matrix.ref }} + path: repositories/${{ matrix.repository }} + + - run: ${{ matrix.command || 'biome check --max-diagnostics=200 .' }} + working-directory: repositories/${{ matrix.repository }}/${{ matrix.working-directory }} diff --git a/README.md b/README.md index 852b0f6..1f87d43 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# ecosystem-ci \ No newline at end of file +# Ecosystem CI + +This repository is used to run integration tests for projects that use Biome. \ No newline at end of file