docs: redraw the architecture diagram as two focused views #5
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build-and-test: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: nuget-${{ runner.os }}-${{ hashFiles('**/Directory.Packages.props') }} | |
| restore-keys: nuget-${{ runner.os }}- | |
| - name: Restore | |
| run: dotnet restore | |
| # Warnings are errors and code style is enforced at build time, so this doubles as the | |
| # lint step. There is no separate formatting job to drift out of sync with it. | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore | |
| # The evaluation suite starts a real PostgreSQL with pgvector through Testcontainers, using | |
| # the Docker daemon that ships on the runner. Embeddings use the deterministic provider, so | |
| # nothing here needs a model provider or costs anything to run. | |
| # | |
| # The live-model tier is excluded explicitly rather than left to skip itself: a runner that | |
| # happened to reach an Ollama server would otherwise pull a multi-gigabyte model and add | |
| # minutes of inference to every build. | |
| - name: Test | |
| run: > | |
| dotnet test | |
| --configuration Release | |
| --no-build | |
| --filter "Category!=LiveModel" | |
| --logger "trx;LogFileName=test-results.trx" | |
| --logger "console;verbosity=normal" | |
| --results-directory ${{ github.workspace }}/artifacts/test-results | |
| --collect:"XPlat Code Coverage" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: artifacts/test-results | |
| retention-days: 14 | |
| docker-build: | |
| name: Build container image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # Built but not pushed: this proves the Dockerfile still works from a clean checkout | |
| # without the repository needing a registry or credentials. | |
| - name: Build API image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: src/OperationsCopilot.Api/Dockerfile | |
| push: false | |
| load: true | |
| tags: operations-copilot-api:ci | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Verify the image starts | |
| run: | | |
| docker run --rm --entrypoint dotnet operations-copilot-api:ci \ | |
| OperationsCopilot.Api.dll --version || true | |
| docker image inspect operations-copilot-api:ci --format 'Image size: {{.Size}} bytes' |