-
Notifications
You must be signed in to change notification settings - Fork 0
/
unit-test.yml
33 lines (29 loc) · 1013 Bytes
/
unit-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
parameters:
buildConfiguration: 'Release'
dotnetSdkVersion: '6.x'
jobs:
- job: 'RunUnitTests'
dependsOn: Deploy
displayName: 'Run unit tests'
pool:
vmImage: 'windows-2019'
variables:
- group: 'Release'
steps:
- task: UseDotNet@2
displayName: 'Use .NET SDK ${{ parameters.dotnetSdkVersion }}'
inputs:
version: '${{ parameters.dotnetSdkVersion }}'
- task: DotNetCoreCLI@2
displayName: 'Build the project - ${{ parameters.buildConfiguration }}'
inputs:
command: 'build'
arguments: '--configuration ${{ parameters.buildConfiguration }}'
projects: '$(System.DefaultWorkingDirectory)/**/*test.csproj'
- task: DotNetCoreCLI@2
displayName: 'Run unit tests - ${{ parameters.buildConfiguration }}'
inputs:
command: 'test'
arguments: '--no-build --configuration $(buildConfiguration)'
publishTestResults: true
projects: '$(System.DefaultWorkingDirectory)/**/*test.csproj'