-
Notifications
You must be signed in to change notification settings - Fork 5.5k
121 lines (100 loc) · 3.68 KB
/
quality-fork.yml
File metadata and controls
121 lines (100 loc) · 3.68 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Quality (Fork)
# Fork-safe quality variant. Only runs on PRs from forked repositories
# (or via manual dispatch) so secret-less forks still get lint, typecheck,
# and a build smoke without inheriting any privileged secrets.
on:
pull_request:
branches: [main, develop]
workflow_dispatch:
concurrency:
group: quality-fork-${{ github.ref }}
cancel-in-progress: true
env:
BUN_VERSION: "1.3.13"
NODE_VERSION: "24.15.0"
jobs:
lint:
name: Lint
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup workspace dependencies
uses: ./.github/actions/setup-bun-workspace
with:
bun-version: ${{ env.BUN_VERSION }}
install-command: bun install --ignore-scripts --no-frozen-lockfile
- name: Run lint
run: bun run lint
- name: Run format check
run: bun run format:check
typecheck:
name: Type Check
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup workspace dependencies
uses: ./.github/actions/setup-bun-workspace
with:
bun-version: ${{ env.BUN_VERSION }}
install-command: bun install --ignore-scripts --no-frozen-lockfile
# @elizaos/core's package.json points "main"/"types" at dist/ files
# that don't exist until the build runs. Plugins that resolve core
# via node_modules (rather than the root tsconfig path mapping) fail
# typecheck without this. turbo.json declares `typecheck` depends on
# `@elizaos/core#build`, but downstream packages with broken src
# references can fail before turbo schedules the core build, so we
# build it explicitly here.
- name: Build @elizaos/core dist
working-directory: packages/core
run: bun run build
- name: Run typecheck
run: bun run typecheck
build:
name: Build
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup workspace dependencies
uses: ./.github/actions/setup-bun-workspace
with:
bun-version: ${{ env.BUN_VERSION }}
install-command: bun install --ignore-scripts --no-frozen-lockfile
- name: Build
run: bun run build
- name: Build homepage
working-directory: packages/homepage
run: bun run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install homepage browser
working-directory: packages/homepage
run: ../../node_modules/.bin/playwright install --with-deps chromium
- name: Test homepage downloads
working-directory: packages/homepage
run: bun run test:e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}