-
Notifications
You must be signed in to change notification settings - Fork 6
148 lines (140 loc) · 4.97 KB
/
Copy pathci.yml
File metadata and controls
148 lines (140 loc) · 4.97 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: .tool-versions
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
typecheck:
name: Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: .tool-versions
- run: pnpm install --frozen-lockfile
- run: pnpm run typecheck
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: .tool-versions
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm test
- run: pnpm test:smoke
mutation:
name: Mutation Testing (${{ matrix.file }})
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
# One job per file instead of one job for all of them: each gets its own runner (its own 4 vCPUs, not shared with the others), so every file's mutants run genuinely in parallel across separate machines rather than sequentially through a single job's own worker pool. The prior single-job run took over an hour and was still going when a too-short timeout cancelled it -- this is the actual fix for that, not just a bigger number. The list grew from the original three files once mesh-store.ts's own logic was split across ten collaborator files -- each now gets its own matrix entry and its own mutation score, matching stryker.config.ts's own mutate list.
strategy:
fail-fast: false
matrix:
file:
[
identity,
mesh-store,
wire-mesh-transport,
agent-registry,
connection-approval,
delivery-engine,
federation-bridge,
mesh-store-shared,
peer-lifecycle,
room-lifecycle,
room-messaging,
room-protocol,
room-wire-extensions,
stale-agent-checker,
]
# 120 minutes wasn't enough for mesh-store.ts specifically -- it was still running (identity.ts finished in 20 minutes, wire-mesh-transport.ts's own dry run failed in under 2) when that ceiling cancelled it on the first real matrix dispatch. Raised back to the same generous budget the prior single-job run used; a shorter-lived file finishing early costs the other matrix entries nothing, since each runs on its own independent runner.
timeout-minutes: 240
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: .tool-versions
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm exec stryker run stryker.config.ts --mutate "src/core/${{ matrix.file }}.ts"
- uses: actions/upload-artifact@v7
if: always()
with:
name: mutation-report-${{ matrix.file }}
path: reports/mutation/mutation.html
retention-days: 30
pages:
name: GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: [lint, typecheck, test]
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: .tool-versions
- run: pnpm install --frozen-lockfile
- run: pnpm build:frontend
- name: Assemble static site
run: |
mkdir -p github-pages
cp src/bridges/user/web/frontend/index.html github-pages/
cp -r src/bridges/user/web/dist/* github-pages/
- uses: actions/upload-pages-artifact@v5
with:
path: github-pages
- uses: actions/deploy-pages@v5
id: deployment
release:
name: Release
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: [lint, typecheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: .tool-versions
# Do NOT set registry-url — it creates an .npmrc that overrides OIDC
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: HUSKY=0 pnpm exec semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}