-
-
Notifications
You must be signed in to change notification settings - Fork 0
268 lines (251 loc) · 9.66 KB
/
ecosystem-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
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: ubuntu-latest
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: --organize-imports-enabled=false .
- id: ariakit
repository: ariakit/ariakit
- id: astro
repository: withastro/astro
- id: baidu-amis
repository: baidu/amis
working-directory: packages/office-viewer/
arguments: --organize-imports-enabled=false .
- id: coder
repository: coder/coder
working-directory: site/
arguments: e2e/ src/
- id: daisyui
repository: saadeghi/daisyui
- 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: --organize-imports-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: nitro
repository: unjs/nitro
- 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: orama
repository: askorama/orama
arguments: --organize-imports-enabled=false .
- id: plotlyjs
repository: plotly/plotly.js
- 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: --organize-imports-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: sentry
repository: getsentry/sentry
- id: sentry-javascript
repository: getsentry/sentry-javascript
- 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: --organize-imports-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: ubuntu-latest
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: Test details
id: test
working-directory: repository/${{ matrix.working-directory }}
run: |
biome check --error-on-warnings --max-diagnostics=1000 ${{ matrix.arguments || '.' }}
- name: Test summary
if: ${{ ! cancelled() }}
working-directory: repository/${{ matrix.working-directory }}
run: >
biome check --reporter=summary ${{ matrix.arguments || '.' }} 2> /dev/null
| tee "$GITHUB_WORKSPACE/biome-summary.txt";
- name: Upload Biome summary
# Don't save the summary if the biome binary was not built on main.
if: ${{ ! cancelled() && (! 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-summary-${{ matrix.id }}
path: biome-summary.txt
- name: Download previous Biome summary
if: ${{ ! cancelled() }}
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6.0.0
with:
workflow_conclusion: completed
# Find the most recent workflow run with an artifact with the given `name`
search_artifacts: true
if_no_artifact_found: warn
name: biome-summary-${{ matrix.id }}
path: downloads/
# Steps to notify Discord
- name: Notification tag and Biome summary diff
if: ${{ always() }}
id: notification
run: |
if ${{ steps.test.outcome == 'success' }}; then
TAG='✅'
elif ${{ steps.test.outcome == 'failure' }}; then
TAG='❌'
else
TAG='❓'
fi
if ! test -e downloads/biome-summary.txt || ! test -e biome-summary.txt; then
TAG="$TAG 🆕"
elif ! diff --color=auto --minimal --unified=1000 --ignore-matching-line='^Checked' --ignore-all-space downloads/biome-summary.txt biome-summary.txt; then
if test "$(wc -l < downloads/biome-summary.txt)" -le "$(wc -l < biome-summary.txt)"; then
TAG="$TAG 📈"
else
TAG="$TAG 📉"
fi
fi
if test -e biome-summary.txt; then
TIME="$(sed -En 's/^Checked.*in ([0-9]+m?s).*/\1/p' < biome-summary.txt)"
else
TIME='?'
fi
echo "TAG=$TAG" >> "$GITHUB_OUTPUT"
echo "TIME=$TIME" >> "$GITHUB_OUTPUT"
- name: Notify Discord
if: ${{ always() && steps.notification.outputs.TAG }}
uses: tsickert/discord-webhook@86dc739f3f165f16dadc5666051c367efa1692f4 # v6.0.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: "${{ steps.notification.outputs.TAG }} \
biome(**${{ inputs.biome-ref || 'main' }}**) \
**${{ matrix.id }}** \
${{ steps.notification.outputs.TIME }} \
[action](<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>)"