Skip to content

Commit 72b582b

Browse files
Update the build pipeline to capture test results when using MTP
1 parent 0edfe6f commit 72b582b

3 files changed

Lines changed: 8 additions & 13 deletions

File tree

asp.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<File Path=".gitattributes" />
3838
<File Path=".gitignore" />
3939
<File Path="azure-pipelines.yml" />
40+
<File Path="global.json" />
4041
<File Path="LICENSE.txt" />
4142
<File Path="logo.svg" />
4243
<File Path="nuget.config" />

build/steps-ci.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
parameters:
2-
- name: solution
3-
type: string
4-
default: ''
52
- name: configuration
63
type: string
74
default: Release
@@ -13,11 +10,11 @@ steps:
1310
packageType: sdk
1411
version: 10.0.x # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
1512

16-
- task: DotNetCoreCLI@2
13+
- script: dotnet test --configuration ${{ parameters.configuration }} --logger "trx"
1714
displayName: Build and Test
15+
16+
- task: PublishTestResults@2
1817
inputs:
19-
command: test
20-
projects: ${{ parameters.solution }}
21-
arguments: --configuration ${{ parameters.configuration }}
22-
testRunTitle: Unit Tests
23-
publishTestResults: true
18+
testResultsFormat: VSTest
19+
testResultsFiles: '**/*.trx'
20+
failTaskOnFailedTests: true

build/steps-release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
parameters:
2-
- name: solution
3-
type: string
4-
default: ''
52
- name: configuration
63
type: string
74
default: Release
@@ -14,7 +11,7 @@ steps:
1411
displayName: Pack Packages
1512
inputs:
1613
command: pack
17-
projects: ${{ parameters.solution }}
14+
projects: asp.slnx
1815
${{ if eq(parameters.versionSuffix, '') }}:
1916
arguments: --no-build --configuration ${{ parameters.configuration }}
2017
${{ else }}:

0 commit comments

Comments
 (0)