-
Notifications
You must be signed in to change notification settings - Fork 1
144 lines (122 loc) · 6.07 KB
/
Copy pathci.yml
File metadata and controls
144 lines (122 loc) · 6.07 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
name: CI
# Build/test verification, scoped to main. Its "CI / Complete verification" check is the
# branch ruleset's required status check.
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOTNET_NOLOGO: 'true'
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
jobs:
verification:
name: Complete verification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
cache: true
cache-dependency-path: '**/*.csproj'
- name: Restore
run: dotnet restore AgentMemory.slnx
- name: Build
run: dotnet build AgentMemory.slnx -c Release --no-restore
- name: Repository consistency checks
run: |
missing=0
while IFS='|' read -r package_id project; do
[[ -z "$package_id" || "$package_id" == \#* ]] && continue
if [[ ! -f "$project" ]]; then
echo "::error::eng/release-packages.txt references a missing project: $project"
missing=1
fi
done < eng/release-packages.txt
manifest_ids="$(grep -v '^#' eng/release-packages.txt | grep -v '^$' | cut -d'|' -f1 | sort)"
actual_ids="$(find src -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort)"
unlisted="$(comm -23 <(echo "$actual_ids") <(echo "$manifest_ids"))"
if [[ -n "$unlisted" ]]; then
echo "::error::src/ project(s) not listed in eng/release-packages.txt:"
echo "$unlisted"
missing=1
fi
[[ "$missing" -eq 0 ]] || exit 1
echo "eng/release-packages.txt matches src/*/ exactly."
- name: Unit + SemanticKernel tests
run: >
dotnet test AgentMemory.slnx -c Release --no-build
--filter "Category!=Integration&Category!=Performance"
--logger "trx;LogFileName=unit.trx"
--collect:"XPlat Code Coverage"
--results-directory TestResults
# Testcontainers spins up neo4j:5.26 automatically — no manual service container needed.
- name: Integration tests
run: >
dotnet test tests/AgentMemory.Tests.Integration/AgentMemory.Tests.Integration.csproj
-c Release --no-build
--filter "Category=Integration"
--logger "trx;LogFileName=integration.trx"
--collect:"XPlat Code Coverage"
--results-directory TestResults
# Spec §6.6 smoke tests (multi-message persistence, recall latency, depth scaling).
# Thresholds are generous so they are robust on shared runners; also Testcontainers-backed.
- name: Performance smoke tests
run: >
dotnet test tests/AgentMemory.Tests.Performance/AgentMemory.Tests.Performance.csproj
-c Release --no-build
--logger "trx;LogFileName=performance.trx"
--collect:"XPlat Code Coverage"
--results-directory TestResults
- name: Static upstream schema parity
run: >
dotnet run --project tools/AgentMemory.Cli/AgentMemory.Cli.csproj
-c Release --no-build --
schema-parity --upstream-version 0.5.0
- name: Sample smoke builds
run: |
dotnet build samples/AgentMemory.Sample.AgentWithMemory/AgentMemory.Sample.AgentWithMemory.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.RealAgent/AgentMemory.Sample.RealAgent.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.MemoryToolsAgent/AgentMemory.Sample.MemoryToolsAgent.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.ChatHistoryProvider/AgentMemory.Sample.ChatHistoryProvider.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.MinimalAgent/AgentMemory.Sample.MinimalAgent.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.BlendedAgent/AgentMemory.Sample.BlendedAgent.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.McpHost/AgentMemory.Sample.McpHost.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.ShoppingAssistant/AgentMemory.Sample.ShoppingAssistant.csproj -c Release --no-restore
dotnet build samples/AgentMemory.Sample.NamsAgent/AgentMemory.Sample.NamsAgent.csproj -c Release --no-restore
dotnet build samples/AspireDemo/AspireDemo.AppHost/AspireDemo.AppHost.csproj -c Release --no-restore
dotnet build samples/AspireDemo/AspireDemo.DemoApp/AspireDemo.DemoApp.csproj -c Release --no-restore
# Dry-run pack of exactly the projects release-time will publish — catches packaging
# regressions (missing README/icon/metadata) on every PR, not just when a tag is pushed.
- name: Package validation (dry-run pack)
run: |
mkdir -p /tmp/pack-verify
while IFS='|' read -r package_id project; do
[[ -z "$package_id" || "$package_id" == \#* ]] && continue
dotnet pack "$project" -c Release --no-build -o /tmp/pack-verify
done < eng/release-packages.txt
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results
path: TestResults/*.trx
if-no-files-found: ignore
# Public repo: works tokenless, but a CODECOV_TOKEN repo secret (from codecov.io, after
# linking this repo) is recommended to avoid the shared tokenless uploader's rate limits.
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
directory: TestResults
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false