Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions .github/workflows/ci.yml

This file was deleted.

57 changes: 54 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,59 @@ pr:
- release/*

pool:
vmImage: ubuntu-latest
vmImage: windows-latest

steps:
- script: echo "Hello from Azure Pipelines"
displayName: Hello world
- task: PowerShell@2
displayName: 'Install .NET'
inputs:
filePath: build/install-dotnet.ps1

- task: PowerShell@2
displayName: 'Restore'
inputs:
filePath: build.ps1
arguments: -RestoreOnly

- task: PowerShell@2
displayName: 'Dotnet Build'
inputs:
filePath: build.ps1

- task: PowerShell@2
displayName: 'Dotnet Pack'
inputs:
filePath: pack.ps1

- task: AzureCLI@2
displayName: 'Dotnet Test'
inputs:
# ARM service connection using Workload Identity Federation (no client secret).
azureSubscription: '.NET Provider GitHub PR Integration Test'
addSpnToEnvironment: true
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
# Configure the env vars that DefaultAzureCredential -> WorkloadIdentityCredential reads.
# Do NOT set AZURE_CLIENT_SECRET.
$env:AZURE_CLIENT_ID = $env:servicePrincipalId
$env:AZURE_TENANT_ID = $env:tenantId

$tokenPath = Join-Path "$(Agent.TempDirectory)" "azure-federated-token.txt"
Set-Content -Path $tokenPath -Value $env:idToken -NoNewline
$env:AZURE_FEDERATED_TOKEN_FILE = $tokenPath

$env:AZURE_SUBSCRIPTION_ID = (az account show --query id -o tsv)

& "$(Build.SourcesDirectory)\test.ps1"
workingDirectory: '$(Build.SourcesDirectory)'

- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'vstest'
testResultsFiles: '**/*.trx'
searchFolder: '$(Build.SourcesDirectory)'
failTaskOnFailedTests: true
testRunTitle: 'Unit Tests'