Skip to content

Instantly share code, notes, and snippets.

@Jeroen-VdB
Created December 1, 2021 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jeroen-VdB/891ea231cf56a9811fcc6aff11f3dd94 to your computer and use it in GitHub Desktop.
Save Jeroen-VdB/891ea231cf56a9811fcc6aff11f3dd94 to your computer and use it in GitHub Desktop.
.NET 6 Azure Pipeline Unit Tests
variables:
- name: solutionPath
value: '**/*.sln'
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: Test
displayName: Build and test solution
jobs:
- job: Test
displayName: Run tests
steps:
- task: UseDotNet@2
displayName: "Use .NET 6.x"
inputs:
version: '6.0.x'
packageType: sdk
- task: DotNetCoreCLI@2
displayName: Restore Solutions
inputs:
command: 'restore'
feedsToUse: 'select'
projects: '$(solutionPath)'
- task: DotNetCoreCLI@2
displayName: Run all tests
inputs:
command: 'test'
projects: '$(solutionPath)'
publishTestResults: true
testRunTitle: '$(Build.SourceBranchName)_$(Build.BuildId)'
arguments: '--no-restore --configuration release'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment