Files
Pranay Prakash 22a9668dcf Validate pending changesets in CI so a bad one fails the PR, not the Release job (#3964)
`changeset version` assembles a release plan from every pending changeset
before it bumps anything, and throws on a changeset it cannot place there:
one naming a package outside the workspace, or one mixing a package from
the `ignore` list with published ones. #3938 shipped the latter and every
push to main since has failed to publish (#3963). Nothing at PR time ran
that step.

scripts/check-changesets.mjs runs the same assembly on the same inputs,
resolving the libraries from @changesets/cli's own install so the check
uses exactly the versions the Release job does, and stops before the
network-bound changelog generation. lint.yml runs it on every PR.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-03 17:02:00 -07:00

137 lines
3.9 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/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
with:
install: true
require-lockfile: true
runtime: node@22
cache: true
- 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
no-unrun-tests:
name: No Unrun 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
# `turbo test` only runs a package's tests if that package declares a
# `test` script, so a suite can exist for months without ever running.
# See #3731.
- name: Check every test file is run by turbo test or a CI lane
run: node scripts/check-no-unrun-tests.mjs
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"
changesets:
name: Changesets
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
with:
install: true
require-lockfile: true
runtime: node@22
cache: true
# `changeset version` (release.yml) assembles a release plan from every
# pending changeset before it bumps anything. A changeset it cannot
# place in that plan, such as one that mixes an `ignore`d private
# package with published ones, fails the Release job on main and blocks
# publishing until it is fixed (#3963). Run the same assembly here.
- name: Check pending changesets assemble into a release plan
run: node scripts/check-changesets.mjs
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/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
with:
install: true
require-lockfile: true
runtime: node@22
cache: true
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Validate docs links
run: bun ./scripts/lint.ts
working-directory: docs