Skip to content

Commit addc820

Browse files
authored
Merge pull request #34 from sharpninja/claude/busy-dubinsky
Add Nuke build system and migrate build scripts
2 parents 5655e5d + fa54266 commit addc820

70 files changed

Lines changed: 4618 additions & 239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ For specific operational instructions (session bootstrap, turn logging lifecycle
2323
## Build, Test, Lint
2424

2525
```powershell
26-
# Build
27-
dotnet build src\McpServer.Support.Mcp -c Debug
28-
dotnet build src\McpServer.Client -c Debug
26+
# Build (via Nuke)
27+
./build.ps1 Compile
28+
# or: dotnet build src\McpServer.Support.Mcp -c Debug
2929
30-
# Run unit tests
31-
dotnet test tests\McpServer.Support.Mcp.Tests -c Debug
32-
dotnet test tests\McpServer.Client.Tests -c Debug
30+
# Run all unit tests (via Nuke)
31+
./build.ps1 Test
32+
# or individual projects:
33+
# dotnet test tests\McpServer.Support.Mcp.Tests -c Debug
34+
# dotnet test tests\McpServer.Client.Tests -c Debug
35+
# dotnet test tests\Build.Tests -c Debug
3336
3437
# Run integration tests (uses CustomWebApplicationFactory, in-memory EF)
3538
dotnet test tests\McpServer.Support.Mcp.IntegrationTests -c Debug
@@ -40,8 +43,12 @@ dotnet test tests\McpServer.Support.Mcp.Tests -c Debug --filter "FullyQualifiedN
4043
# Run tests in a single class
4144
dotnet test tests\McpServer.Support.Mcp.Tests -c Debug --filter "FullyQualifiedName~TodoServiceTests"
4245
43-
# Validate appsettings config
44-
pwsh.exe ./scripts/Validate-McpConfig.ps1
46+
# Validate appsettings config (via Nuke)
47+
./build.ps1 ValidateConfig
48+
# or: pwsh.exe ./scripts/Validate-McpConfig.ps1
49+
50+
# Validate requirements traceability
51+
./build.ps1 ValidateTraceability
4552
4653
# Markdown lint (docs only)
4754
# CI uses markdownlint-cli2 with .markdownlint-cli2.yaml

.github/workflows/build.yml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- src/**
8+
- tests/**
9+
- build/**
10+
- build.ps1
11+
- build.sh
12+
- '*.sln'
13+
- Directory.Build.props
14+
- Directory.Packages.props
15+
- GitVersion.yml
16+
- .github/workflows/build.yml
17+
pull_request:
18+
branches: [main, develop]
19+
paths:
20+
- src/**
21+
- tests/**
22+
- build/**
23+
- build.ps1
24+
- build.sh
25+
- '*.sln'
26+
- Directory.Build.props
27+
- Directory.Packages.props
28+
- GitVersion.yml
29+
- .github/workflows/build.yml
30+
31+
jobs:
32+
build-test:
33+
name: Build & Test
34+
runs-on: windows-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
- name: Setup .NET
41+
uses: actions/setup-dotnet@v4
42+
with:
43+
global-json-file: global.json
44+
45+
- name: Compile
46+
run: ./build.ps1 Compile --configuration Release
47+
shell: pwsh
48+
49+
- name: Test
50+
run: ./build.ps1 Test --configuration Release
51+
shell: pwsh
52+
53+
- name: Upload test results
54+
if: always()
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: test-results
58+
path: TestResults/**/*.trx
59+
if-no-files-found: ignore
60+
61+
validate:
62+
name: Validate
63+
runs-on: windows-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
67+
- name: Setup .NET
68+
uses: actions/setup-dotnet@v4
69+
with:
70+
global-json-file: global.json
71+
72+
- name: Validate Config
73+
run: ./build.ps1 ValidateConfig
74+
shell: pwsh
75+
76+
- name: Validate Traceability
77+
run: ./build.ps1 ValidateTraceability
78+
shell: pwsh
79+
80+
package:
81+
name: Package
82+
needs: build-test
83+
runs-on: windows-latest
84+
steps:
85+
- uses: actions/checkout@v4
86+
with:
87+
fetch-depth: 0
88+
89+
- name: Setup .NET
90+
uses: actions/setup-dotnet@v4
91+
with:
92+
global-json-file: global.json
93+
94+
- name: Pack NuGet
95+
run: ./build.ps1 PackNuGet --configuration Release
96+
shell: pwsh
97+
98+
- name: Pack REPL Tool
99+
run: ./build.ps1 PackReplTool --configuration Release
100+
shell: pwsh
101+
102+
- name: Upload NuGet packages
103+
uses: actions/upload-artifact@v4
104+
with:
105+
name: nuget-packages
106+
path: artifacts/nupkg/*.nupkg
107+
108+
- name: Upload REPL tool package
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: repl-tool-package
112+
path: local-packages/*.nupkg
113+
114+
msix:
115+
name: MSIX Package
116+
needs: build-test
117+
runs-on: windows-latest
118+
continue-on-error: true
119+
steps:
120+
- uses: actions/checkout@v4
121+
with:
122+
fetch-depth: 0
123+
124+
- name: Setup .NET
125+
uses: actions/setup-dotnet@v4
126+
with:
127+
global-json-file: global.json
128+
129+
- name: Package MSIX
130+
run: ./build.ps1 PackageMsix --configuration Release
131+
shell: pwsh
132+
133+
- name: Upload MSIX artifact
134+
if: success()
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: msix-package
138+
path: artifacts/msix/*.msix
139+
140+
publish:
141+
name: Publish
142+
needs: build-test
143+
if: github.event_name == 'push'
144+
runs-on: windows-latest
145+
steps:
146+
- uses: actions/checkout@v4
147+
with:
148+
fetch-depth: 0
149+
150+
- name: Setup .NET
151+
uses: actions/setup-dotnet@v4
152+
with:
153+
global-json-file: global.json
154+
155+
- name: Publish Server
156+
run: ./build.ps1 Publish --configuration Release
157+
shell: pwsh
158+
159+
- name: Upload publish artifact
160+
uses: actions/upload-artifact@v4
161+
with:
162+
name: mcp-server-publish
163+
path: artifacts/mcp-server/

0 commit comments

Comments
 (0)