sharee.bike-App/UnitTests.yml
2023-04-22 14:43:58 +00:00

95 lines
3.2 KiB
YAML

# Outdated version of pipeline. Use UnitTestsV2 (https://dev.azure.com/TeilRad/sharee.bike%20App/_build?definitionId=33) instead
# Builds and tests sharee.bike components.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- main
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
jobs:
- job: RunUnittests
displayName: "Run Unit Tests"
steps:
# Get code from Open Source repo.
# https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#specify-multiple-repositories
- checkout: git://sharee.bike App/Code
- task: DotNetCoreCLI@2
displayName: "Build TestLockItShared Unit Tests"
inputs:
command: 'build'
projects: '**/TestLockItShared.csproj'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: "Build TestLockItBLE Unit Tests"
inputs:
command: 'build'
projects: '**/TestLockItBLE.csproj'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: "Build TestShareeLib Unit Tests"
inputs:
command: 'build'
projects: '**/TestShareeLib.csproj'
configuration: '$(buildConfiguration)'
# Infos about test filters see
# https://docs.microsoft.com/en-us/previous-versions/jj155796(v=vs.140)?redirectedfrom=MSDN
- task: VSTest@2
displayName: "Run tests TestLockItShared"
inputs:
failOnMinTestsNotRun: true
minimumExpectedTests: 6
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\TestLockItShared.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
testFiltercriteria: 'TestCategory!=Explicit&TestCategory!=RequiresCOPRI&TestCategory!=RequiresCOPRI.Live&TestCategory!=RequiresCOPRI.Devel'
- task: VSTest@2
displayName: "Run tests TestLockItBLE"
inputs:
failOnMinTestsNotRun: true
minimumExpectedTests: 19
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\TestLockItBLE.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
testFiltercriteria: 'TestCategory!=Explicit&TestCategory!=RequiresCOPRI&TestCategory!=RequiresCOPRI.Live&TestCategory!=RequiresCOPRI.Devel'
- task: VSTest@2
displayName: "Run tests ShareeLib"
inputs:
failOnMinTestsNotRun: true
minimumExpectedTests: 303
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\TestShareeLib.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
testFiltercriteria: 'TestCategory!=Explicit&TestCategory!=RequiresCOPRI&TestCategory!=RequiresCOPRI.Live&TestCategory!=RequiresCOPRI.Devel'
- task: VSTest@2
displayName: "Run tests Sharee"
inputs:
failOnMinTestsNotRun: false # there are not yet tests in project.
minimumExpectedTests: 1
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\TestSharee.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
testFiltercriteria: 'TestCategory!=Explicit&TestCategory!=RequiresCOPRI&TestCategory!=RequiresCOPRI.Live&TestCategory!=RequiresCOPRI.Devel'