-
-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (80 loc) · 3.21 KB
/
Copy pathci.yml
File metadata and controls
101 lines (80 loc) · 3.21 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
name: CI
on:
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "*.md"
- "LICENSE"
push:
branches: [main]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
lint:
name: Lint & Format
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
# Generates gitignored worker-configuration.d.ts for api, mcp, and web.
# Type-aware oxlint needs these (Env, ExportedHandler, bindings).
- name: Generate Wrangler types
run: pnpm types
# apps/mcp imports @buildinternet/uploads from its built dist; type-aware
# oxlint needs the package built to resolve those modules.
- name: Build workspace packages
run: pnpm --filter @buildinternet/uploads run build
# tsc --noEmit across every workspace. Type-aware oxlint below is not a
# substitute — it doesn't run the compiler. CONTRIBUTING.md documents
# this as part of the CI gate.
- name: Typecheck
run: pnpm typecheck
- name: Oxlint
run: pnpm lint
- name: Oxfmt
run: pnpm format:check
# Two ways a changeset can break the Release workflow after merge, both
# rejected here: naming a package outside the workspace (hard failure), and
# naming an ignored package, which yields an empty version PR and silently
# blocks the npm publish. Static by design — `changeset status` covers only
# the first and needs git history this shallow checkout does not have.
- name: Changeset lint
run: pnpm changeset:lint
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Generate Wrangler types
run: pnpm types
# Single-process Vitest across every workspace project (see vitest.projects.ts).
# The root `pretest` builds @buildinternet/uploads first — apps/mcp imports
# it from dist. Replaces the former serial `pnpm --filter … test` chain and
# adds apps/web, packages/email, and packages/errors to CI coverage.
- name: Run tests
run: pnpm test
- name: Verify npm package
run: pnpm --filter @buildinternet/uploads run build && pnpm --filter @buildinternet/uploads run pack:check
- name: Bundle remote MCP Worker
run: pnpm --filter @uploads/mcp run bundle:check