Close all 9 DSL migration gaps (spec 038): identity resolution pipeli… #563
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/CD Build | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| push: | |
| branches: ["main"] | |
| release: | |
| types: [published] | |
| jobs: | |
| # ── Single CI job: one build per event ────────────────────────────────────── | |
| ci: | |
| name: Build and Test | |
| # net481 targets require Windows; build.ps1 is the single entry point | |
| runs-on: windows-latest | |
| permissions: | |
| checks: write | |
| contents: read | |
| pull-requests: write | |
| outputs: | |
| semver: ${{ steps.version.outputs.semVer }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v3 | |
| with: | |
| versionSpec: "6.1.0" | |
| - name: Determine Version | |
| id: version | |
| uses: gittools/actions/gitversion/execute@v3 | |
| with: | |
| useConfigFile: true | |
| configFilePath: .build/GitVersion.yml | |
| - name: Restore | |
| run: dotnet restore DevOpsMigrationPlatform.slnx | |
| - name: Build | |
| run: pwsh ./build.ps1 -Mode Build | |
| - name: Verify SchemaGenerator connector references | |
| run: | | |
| $csproj = Get-Content "src/DevOpsMigrationPlatform.SchemaGenerator/DevOpsMigrationPlatform.SchemaGenerator.csproj" -Raw | |
| $connectors = @("Infrastructure.Simulated", "Infrastructure.AzureDevOps", "Infrastructure.TfsObjectModel") | |
| $missing = $connectors | Where-Object { $csproj -notmatch $_ } | |
| if ($missing) { Write-Host "Missing SchemaGenerator connector references: $($missing -join ', ')" -ForegroundColor Red; exit 1 } | |
| Write-Host "All connector references present in SchemaGenerator.csproj" | |
| shell: pwsh | |
| - name: Test | |
| timeout-minutes: 3 | |
| run: pwsh ./build.ps1 -Mode Test | |
| - name: System Test (Smoke) | |
| timeout-minutes: 2 | |
| run: pwsh ./build.ps1 -Mode SystemTest_Smoke | |
| - name: System Test (Simulated) | |
| timeout-minutes: 3 | |
| run: pwsh ./build.ps1 -Mode SystemTest_Simulated | |
| - name: System Test (Live) | |
| timeout-minutes: 10 | |
| run: pwsh ./build.ps1 -Mode SystemTest_Live | |
| env: | |
| AZDEVOPS_SYSTEM_TEST_ORG: ${{ vars.AZDEVOPS_SYSTEM_TEST_ORG }} | |
| AZDEVOPS_SYSTEM_TEST_PAT: ${{ secrets.AZDEVOPS_SYSTEM_TEST_PAT }} | |
| - name: Package | |
| if: github.event_name != 'pull_request' | |
| run: pwsh ./build.ps1 -Mode Package | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: TestResults/**/*.trx | |
| - name: Publish test results | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: Test Results | |
| path: TestResults/**/*.trx | |
| reporter: dotnet-trx | |
| - name: Upload release packages | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| name: release-packages | |
| path: '.output/build/MigrationTools-*.zip' | |
| if-no-files-found: error | |
| # ── Preview release: auto-create on main push ────────────────────────────── | |
| preview-release: | |
| name: Create Preview Release | |
| needs: ci | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download release packages | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-packages | |
| path: release-assets | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ needs.ci.outputs.semver }} | |
| name: v${{ needs.ci.outputs.semver }} | |
| prerelease: true | |
| generate_release_notes: true | |
| files: release-assets/*.zip | |
| # ── Production release: upload assets to manually-created release ─────────── | |
| release-assets: | |
| name: Upload Release Assets | |
| needs: ci | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download release packages | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-packages | |
| path: release-assets | |
| - name: Upload assets to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: release-assets/*.zip | |