mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
62 lines
1.7 KiB
YAML
62 lines
1.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:
|
|
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"
|
|
|
|
# The docs/ directory does not exist on the stable branch.
|
|
# This job is kept as a no-op so branch protection rules still pass.
|
|
docs-links:
|
|
name: Docs Links
|
|
if: false
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: true
|