-
Notifications
You must be signed in to change notification settings - Fork 23
221 lines (186 loc) · 6.5 KB
/
Copy pathpr_validation.yml
File metadata and controls
221 lines (186 loc) · 6.5 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
name: pr_validation
on:
# Merge queues test a synthetic merge group rather than the pull request ref.
# Required checks must subscribe to this event or queued PRs will never merge.
merge_group:
types:
- checks_requested
push:
branches:
- master
- dev
- main
- feature/*
pull_request:
branches:
- master
- dev
- main
- feature/*
permissions:
contents: read
jobs:
test:
name: Test-${{matrix.os}}
runs-on: ${{matrix.os}}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
rid: linux-x64
- os: windows-latest
rid: win-x64
- os: macos-26
rid: osx-arm64
steps:
- name: "Checkout"
uses: actions/checkout@v7
with:
lfs: true
fetch-depth: 0
- name: "Install .NET SDK"
uses: actions/setup-dotnet@v6
with:
global-json-file: "./global.json"
- name: "Restore .NET tools"
run: dotnet tool restore
- name: "Update release notes"
shell: pwsh
run: |
./build.ps1
- name: "dotnet build"
run: dotnet build -c Release
# Pre-warm the npm cache so MCP stdio smoke tests don't time out downloading
# @modelcontextprotocol/server-everything on the first npx invocation.
- name: "Warm npm cache for MCP smoke tests"
shell: bash
run: npx -y @modelcontextprotocol/server-everything --version || true
# .NET Framework tests can't run reliably on Linux, so we only do .NET 8
- name: "dotnet test"
shell: bash
# blame-hang aborts + writes a Sequence file (naming the in-flight test) and a full process
# dump if a test stalls (no test activity) for 300s, so a hang fails fast (~minutes, not the
# 30-min job cap) and is diagnosable from the CI log + the uploaded dump instead of a silent
# timeout. The full dump carries every thread's stack — needed to confirm the suspected
# macOS/ARM64 weak-memory-ordering hang in the TUI view-models.
run: dotnet test -c Release --blame-hang-timeout 300s --blame-hang-dump-type full --results-directory ./TestResults
# Diagnostic: surface the blame Sequence file (names the stuck test) in the CI log so a
# platform-specific hang can be pinpointed even without downloading the dump artifact.
- name: "Show hang sequence (if a test hung)"
if: always()
shell: bash
run: |
seq=$(find ./TestResults -name '*Sequence*.xml' 2>/dev/null || true)
if [ -n "$seq" ]; then
for f in $seq; do echo "===== HANG SEQUENCE: $f ====="; cat "$f"; echo; done
else
echo "No blame Sequence file — no test hang detected."
fi
# Upload the hang dump + sequence file so a dedicated agent can open the dump (dotnet-dump
# analyze / lldb) and read the stalled thread stacks. Per-OS name; only the macOS run is
# expected to produce one today.
- name: "Upload hang dump"
if: always()
uses: actions/upload-artifact@v7
with:
name: test-hang-dump-${{ matrix.os }}
path: ./TestResults
if-no-files-found: ignore
retention-days: 14
- name: "Publish CLI (single-file, self-contained)"
if: runner.os != 'Windows'
run: >
dotnet publish src/Netclaw.Cli/Netclaw.Cli.csproj
-c Release
-r ${{ matrix.rid }}
--self-contained true
/p:PublishSingleFile=true
/p:EnableCompressionInSingleFile=true
/p:IncludeNativeLibrariesForSelfExtract=true
-o ./publish/cli
- name: "Package and stage CLI binary (simulate release install)"
if: runner.os != 'Windows'
shell: bash
run: |
mkdir -p ./archives ./install-test
tar czf ./archives/netclaw-test.tar.gz -C ./publish/cli netclaw
tar xzf ./archives/netclaw-test.tar.gz -C ./install-test
- name: "CLI smoke tests"
if: runner.os != 'Windows'
shell: bash
run: bash scripts/smoke/cli-smoke.sh
env:
NETCLAW_CLI: ./install-test/netclaw
copyright-headers:
name: Copyright Headers
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checkout"
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: "Verify copyright headers"
shell: pwsh
run: ./scripts/Add-FileHeaders.ps1 -Verify
slopwatch:
name: Slopwatch
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "Checkout"
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: "Install .NET SDK"
uses: actions/setup-dotnet@v6
with:
global-json-file: "./global.json"
- name: "Restore .NET tools"
run: dotnet tool restore
- name: "slopwatch analyze"
run: dotnet slopwatch analyze
install-smoke:
name: Install Script Smoke-${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-26, windows-latest]
steps:
- name: "Checkout"
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: "Install shell integration test dependencies"
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install --yes fish zsh
- name: "install.sh smoke test"
if: runner.os != 'Windows'
shell: bash
run: bash scripts/smoke/install-smoke.sh
- name: "install.ps1 smoke test"
if: runner.os == 'Windows'
shell: pwsh
run: ./scripts/smoke/install-smoke.ps1
- name: "install.ps1 Windows PowerShell 5.1 smoke test"
if: runner.os == 'Windows'
shell: powershell
run: ./scripts/smoke/install-smoke.ps1
semver-conformance:
name: SemVer Conformance
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checkout"
uses: actions/checkout@v7
with:
fetch-depth: 1
# The C# side (SemVerConformanceTests) runs in the Test job; this asserts the
# release-manifest generator's precedence key agrees with the same shared fixture,
# so the two implementations can't silently drift.
- name: "Generator precedence key matches the shared fixture"
run: python3 feeds/scripts/semver_key.py --check feeds/scripts/semver-order.txt