forked from vercel/workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (85 loc) · 2.7 KB
/
Copy pathlint.yml
File metadata and controls
103 lines (85 loc) · 2.7 KB
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
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