NAMS Phase 10d: session-restore asserted live test #108
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |