Skip to content

Commit

Permalink
CI unit tests (#417)
Browse files Browse the repository at this point in the history
* CI to run unit tests

* fixed CI

* fixed ci

* fixed ci

* Upgraded MSTestTestAdapter and MSTestTestFramework

* Changed MSBuild configuration (Unit Tests building) to Debug

* Fixed "Run Unit Tests" .appxrecipe path

Co-authored-by: Etienne BAUDOUX <ebaudoux@velersoftware.com>
  • Loading branch information
rlm96 and veler authored Feb 20, 2022
1 parent 2718663 commit df473d2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
26 changes: 25 additions & 1 deletion ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ trigger:
- main

pool:
vmImage: 'windows-2019'
vmImage: 'windows-2022'

variables:
group: BuildPipelineVariables
uwpProject: '**/*.wapproj'
testProject: '**/*.Tests.csproj'
buildPlatform: 'x86|x64|arm64'
buildConfiguration: 'Release'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
Expand Down Expand Up @@ -51,6 +52,29 @@ jobs:
/p:UapAppxPackageBuildMode=StoreUpload'
maximumCpuCount: true

# Builds unit tests
- task: MSBuild@1
displayName: 'Build Unit Tests'
inputs:
solution: '$(testProject)'
configuration: 'Debug'
msbuildArguments: '/t:build /restore'
maximumCpuCount: true

- task: VSTest@2
displayName: 'Run Unit Tests'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\Debug\**\*.Tests.build.appxrecipe
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
otherConsoleOptions: '/Framework:FrameworkUap10'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
diagnosticsEnabled: True
collectDumpOn: always

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<Nuget_MicrosoftTypeScriptMSBuild>4.4.2</Nuget_MicrosoftTypeScriptMSBuild>
<NuGet_MicrosoftUIXaml>2.6.2</NuGet_MicrosoftUIXaml>
<NuGet_MicrosoftWindowsCsWinRT>1.3.5</NuGet_MicrosoftWindowsCsWinRT>
<NuGet_MSTestTestAdapter>2.1.1</NuGet_MSTestTestAdapter>
<NuGet_MSTestTestFramework>2.1.1</NuGet_MSTestTestFramework>
<NuGet_MSTestTestAdapter>2.2.8</NuGet_MSTestTestAdapter>
<NuGet_MSTestTestFramework>2.2.8</NuGet_MSTestTestFramework>
<NuGet_NewtonsoftJson>12.0.3</NuGet_NewtonsoftJson>
<Nuget_ObservableVector>2.1.0</Nuget_ObservableVector>
<NuGet_Win2D>1.26.0</NuGet_Win2D>
Expand Down

0 comments on commit df473d2

Please sign in to comment.