Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the azure-pipelines.yml script to publish test results. #70

Merged
merged 1 commit into from
Jun 12, 2019
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
125 changes: 64 additions & 61 deletions scripts/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,94 +5,97 @@ pr:
- master

jobs:
- job: windows_debug_x86
- job: windows
pool:
name: Hosted
demands: Cmd
strategy:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to use strategies in order to remove some minor bloat.

matrix:
debug_x86:
_configuration: Debug
_architecture: x86
debug_x64:
_configuration: Debug
_architecture: x64
release_x86:
_configuration: Release
_architecture: x86
release_x64:
_configuration: Release
_architecture: x64
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Debug -architecture x86'

- job: windows_release_x86
pool:
name: Hosted
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Release -architecture x86'

- job: windows_debug_x64
pool:
name: Hosted
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
arguments: '-configuration $(_configuration) -architecture $(_architecture)'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Debug -architecture x64'
testResultsFormat: VSTest
testResultsFiles: artifacts/tst/$(_configuration)/*.trx
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: 'Windows $(_configuration) $(_architecture)'
buildConfiguration: $(_configuration)
buildPlatform: $(_architecture)

- job: windows_release_x64
pool:
name: Hosted
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Release -architecture x64'

- job: ubuntu_1604_debug_x64
- job: ubuntu_1604
pool:
name: Hosted Ubuntu 1604
strategy:
matrix:
debug_x64:
_configuration: Debug
_architecture: x64
release_x64:
_configuration: Release
_architecture: x64
variables:
RuntimeIdentifier: ubuntu.16.04-x64
RuntimeIdentifier: ubuntu.16.04-$(_architecture)
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Debug --architecture x64'

- job: ubuntu_1604_release_x64
pool:
name: Hosted Ubuntu 1604
variables:
RuntimeIdentifier: ubuntu.16.04-x64
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
arguments: '--configuration $(_configuration) --architecture $(_architecture)'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Release --architecture x64'
testResultsFormat: VSTest
testResultsFiles: artifacts/tst/$(_configuration)/*.trx
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: 'Ubuntu 16.04 $(_configuration) $(_architecture)'
buildConfiguration: $(_configuration)
buildPlatform: $(_architecture)

- job: macos_1014_debug_x64
- job: macos_1014
pool:
name: Hosted macOS
strategy:
matrix:
debug_x64:
_configuration: Debug
_architecture: x64
release_x64:
_configuration: Release
_architecture: x64
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Debug --architecture x64'

- job: macos_1014_release_x64
pool:
name: Hosted macOS
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
arguments: '--configuration $(_configuration) --architecture $(_architecture)'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Release --architecture x64'
testResultsFormat: VSTest
testResultsFiles: artifacts/tst/$(_configuration)/*.trx
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: 'MacOS 10.14 $(_configuration) $(_architecture)'
buildConfiguration: $(_configuration)
buildPlatform: $(_architecture)
5 changes: 5 additions & 0 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />

<PropertyGroup>
<VSTestLogger>trx</VSTestLogger>
<VSTestResultsDirectory>$(BaseArtifactsPath)tst/$(Configuration)/</VSTestResultsDirectory>
</PropertyGroup>

<ItemGroup>
<DotNetCliToolReference Include="dotnet-xunit" />
</ItemGroup>
Expand Down