mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
32ac8e73fd
* Fix Biome lint violations and add Biome CI check Biome was not configured to respect .gitignore, so ~92% of the 13,355 reported diagnostics came from gitignored build artifacts. Enable VCS integration (useIgnoreFile), apply safe auto-fixes across the repo, fix the remaining mechanical errors by hand, downgrade judgment-call a11y / dangerouslySetInnerHTML rules to warnings, and add a 'biome ci' job to the Lint workflow so violations block PRs going forward. * Use an empty changeset (no behavior change, no release needed)
104 lines
2.7 KiB
YAML
104 lines
2.7 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "!*"
|
|
pull_request:
|
|
|
|
concurrency:
|
|
# Unique group for this workflow and branch
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
biome:
|
|
name: Biome
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
|
|
|
- name: Setup Node.js 22.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22.x
|
|
cache: "pnpm"
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Biome check
|
|
run: pnpm exec biome ci --max-diagnostics=200
|
|
|
|
no-test-overrides:
|
|
name: No Test Overrides
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check WORKFLOW_SERVER_URL_OVERRIDE is empty
|
|
run: |
|
|
# Ensure the test override constant is not accidentally set
|
|
FILE="packages/world-vercel/src/utils.ts"
|
|
if grep -q "const WORKFLOW_SERVER_URL_OVERRIDE = '';" "$FILE"; then
|
|
echo "✓ WORKFLOW_SERVER_URL_OVERRIDE is empty (safe to merge)"
|
|
else
|
|
echo "✗ ERROR: WORKFLOW_SERVER_URL_OVERRIDE is set to a non-empty value!"
|
|
echo " This constant must be empty string before merging to main."
|
|
echo ""
|
|
echo " Current value:"
|
|
grep "const WORKFLOW_SERVER_URL_OVERRIDE" "$FILE" || true
|
|
exit 1
|
|
fi
|
|
|
|
scripts-tests:
|
|
name: CI Scripts Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js 22.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22.x
|
|
|
|
- name: Run .github/scripts unit tests
|
|
run: node --test ".github/scripts/**/*.test.js"
|
|
|
|
docs-links:
|
|
name: Docs Links
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
|
|
|
- name: Setup Node.js 22.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22.x
|
|
cache: "pnpm"
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Validate docs links
|
|
run: bun ./scripts/lint.ts
|
|
working-directory: docs
|