Skip to content

Commit

Permalink
Upload test results for all OSes (#4327)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Dec 16, 2024
1 parent b87769f commit f371e76
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
11 changes: 10 additions & 1 deletion azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ extends:
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults
ArtifactName: TestResults_Windows
condition: failed()

- task: NuGetAuthenticate@1
Expand Down Expand Up @@ -196,6 +196,15 @@ extends:
name: Test
displayName: Tests
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults_Linux
condition: failed()

- ${{ if eq(variables['Build.SourceBranchName'], 'main') }}:
- template: /eng/common/templates-official/job/onelocbuild.yml@self
parameters:
Expand Down
36 changes: 27 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,23 @@ stages:
name: Test
displayName: Test

# Upload code coverage to codecov.io
- script: $(Build.SourcesDirectory)/.dotnet/dotnet msbuild -restore
eng/CodeCoverage.proj
/p:Configuration=$(_BuildConfig)
/bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\CodeCoverage.binlog
displayName: Upload coverage to codecov.io
condition: and(succeeded(), eq(variables._BuildConfig, 'Debug'))

# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults
ArtifactName: TestResults_Windows_$(_BuildConfig)
condition: failed()

# Upload code coverage to codecov.io
- script: $(Build.SourcesDirectory)/.dotnet/dotnet msbuild -restore
eng/CodeCoverage.proj
/p:Configuration=$(_BuildConfig)
/bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\CodeCoverage.binlog
displayName: Upload coverage to codecov.io
condition: and(succeeded(), eq(variables._BuildConfig, 'Debug'))

- job: Linux
timeoutInMinutes: 90
pool:
Expand Down Expand Up @@ -150,6 +150,15 @@ stages:
name: Test
displayName: Tests
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults_Linux_$(_BuildConfig)
condition: failed()

- job: MacOS
timeoutInMinutes: 90
pool:
Expand Down Expand Up @@ -179,3 +188,12 @@ stages:
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl
name: Test
displayName: Tests
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults_MacOs_$(_BuildConfig)
condition: failed()

0 comments on commit f371e76

Please sign in to comment.