> For the complete documentation index, see [llms.txt](https://framework.aic.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://framework.aic.io/technical-guidelines-code-standards-and-tech-stack/templates-and-reference-assets/ci-pipeline-template.md).

# CI Pipeline Template

{% tabs %}
{% tab title="GitHub Actions Example" %}

```yaml
name: ci

on:
  pull_request:
  push:
    branches: [ main ]

jobs:
  build-test-analyse:
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v4

      - name: Setup .NET
        uses: actions/setup-dotnet@v4
        with:
          global-json-file: global.json

      - name: Restore
        run: dotnet restore

      - name: Format check
        run: dotnet format --verify-no-changes

      - name: Build
        run: dotnet build --configuration Release --no-restore

      - name: Test
        run: dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage"

      - name: Publish artifacts
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: test-results
          path: |
            **/TestResults/**
```

{% endtab %}

{% tab title="Azure DevOps Example" %}

```yaml
trigger:
- main

pool:
  vmImage: windows-latest

steps:
- task: UseDotNet@2
  inputs:
    packageType: sdk
    useGlobalJson: true

- script: dotnet restore
  displayName: Restore

- script: dotnet format --verify-no-changes
  displayName: Format check

- script: dotnet build --configuration Release --no-restore
  displayName: Build

- script: dotnet test --configuration Release --no-build --logger trx
  displayName: Test
```

{% endtab %}
{% endtabs %}

## Notes

Adapt runners for WPF and MAUI builds. MAUI iOS builds require macOS build infrastructure and signing configuration.
