microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
.azdo/ci.yaml
67lines · modecode
| 1 | # ============================================================================= |
| 2 | # This pipeline (teams.net-pr) builds, tests, and packs the SDK (excluding core/). |
| 3 | # PR trigger: main and release/* branches. No CI trigger. |
| 4 | # ============================================================================= |
| 5 | |
| 6 | trigger: none |
| 7 | |
| 8 | pr: |
| 9 | branches: |
| 10 | include: |
| 11 | - main |
| 12 | - release/* |
| 13 | paths: |
| 14 | exclude: |
| 15 | - core/** |
| 16 | |
| 17 | pool: |
| 18 | vmImage: 'ubuntu-22.04' |
| 19 | |
| 20 | variables: |
| 21 | buildConfiguration: 'Release' |
| 22 | |
| 23 | stages: |
| 24 | - stage: Build_Test_Pack |
| 25 | jobs: |
| 26 | - job: BuildTestPack |
| 27 | displayName: 'Build, Test, and Pack' |
| 28 | steps: |
| 29 | |
| 30 | - task: UseDotNet@2 |
| 31 | displayName: 'Use .NET 8' |
| 32 | inputs: |
| 33 | packageType: 'sdk' |
| 34 | version: '8.0.x' |
| 35 | |
| 36 | - task: UseDotNet@2 |
| 37 | displayName: 'Use .NET 10' |
| 38 | inputs: |
| 39 | packageType: 'sdk' |
| 40 | version: '10.0.x' |
| 41 | |
| 42 | - script: dotnet restore |
| 43 | displayName: 'Restore' |
| 44 | |
| 45 | - script: dotnet build --no-restore --configuration $(buildConfiguration) |
| 46 | displayName: 'Build' |
| 47 | |
| 48 | - script: dotnet test --no-build --configuration $(buildConfiguration) --logger trx |
| 49 | displayName: 'Test' |
| 50 | |
| 51 | - task: PublishTestResults@2 |
| 52 | displayName: 'Publish Test Results' |
| 53 | condition: succeededOrFailed() |
| 54 | inputs: |
| 55 | testResultsFormat: 'VSTest' |
| 56 | testResultsFiles: '**/*.trx' |
| 57 | mergeTestResults: true |
| 58 | |
| 59 | - script: dotnet pack --no-build -o $(Build.ArtifactStagingDirectory) /p:SymbolPackageFormat=snupkg --configuration $(buildConfiguration) |
| 60 | displayName: 'Pack' |
| 61 | |
| 62 | - task: PublishPipelineArtifact@1 |
| 63 | displayName: 'Publish NuGet Packages as Pipeline Artifact' |
| 64 | inputs: |
| 65 | targetPath: '$(Build.ArtifactStagingDirectory)' |
| 66 | artifact: 'Packages' |
| 67 | publishLocation: 'pipeline' |
| 68 | |