From 47b4b803e6face8fa9a2174790a97f4fe51ea077 Mon Sep 17 00:00:00 2001 From: Etienne BAUDOUX Date: Sun, 30 Jan 2022 16:30:51 -0800 Subject: [PATCH 1/7] CI to run unit tests --- ci/azure-pipelines.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 21e4268f05..fb5dd629f3 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -12,6 +12,7 @@ pool: variables: group: BuildPipelineVariables uwpProject: '**/*.wapproj' + testProject: '**/*.Tests.csproj' buildPlatform: 'x86|x64|arm64' buildConfiguration: 'Release' appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\' @@ -51,6 +52,25 @@ jobs: /p:UapAppxPackageBuildMode=StoreUpload' maximumCpuCount: true + # Builds unit tests + - task: MSBuild@1 + displayName: 'Build Unit Tests' + inputs: + solution: '$(testProject)' + configuration: '$(buildConfiguration)' + msbuildArguments: '/t:build /restore' + maximumCpuCount: true + + - task: VSTest@2 + displayName: 'Run Unit Tests' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: | + **\$(buildConfiguration)\**\*.Tests.dll + !**\*TestAdapter.dll + !**\obj\** + searchFolder: '$(System.DefaultWorkingDirectory)' + - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' inputs: From c80dfa0b790d98663c97035c977a935b15712da5 Mon Sep 17 00:00:00 2001 From: Etienne BAUDOUX Date: Sun, 30 Jan 2022 17:26:39 -0800 Subject: [PATCH 2/7] fixed CI --- ci/azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index fb5dd629f3..b8c10e4300 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -66,8 +66,7 @@ jobs: inputs: testSelector: 'testAssemblies' testAssemblyVer2: | - **\$(buildConfiguration)\**\*.Tests.dll - !**\*TestAdapter.dll + **\$(buildConfiguration)\**\*.Tests.build.appxrecipe !**\obj\** searchFolder: '$(System.DefaultWorkingDirectory)' From 19fb666e6bca0df749818cda20edd29b19c14af2 Mon Sep 17 00:00:00 2001 From: Etienne BAUDOUX Date: Sun, 30 Jan 2022 18:11:20 -0800 Subject: [PATCH 3/7] fixed ci --- ci/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index b8c10e4300..cc61788850 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -7,7 +7,7 @@ trigger: - main pool: - vmImage: 'windows-2019' + vmImage: 'windows-2022' variables: group: BuildPipelineVariables From df048098a6478f56bb775aed732e5e8cf97dda70 Mon Sep 17 00:00:00 2001 From: Etienne BAUDOUX Date: Sun, 30 Jan 2022 20:29:06 -0800 Subject: [PATCH 4/7] fixed ci --- ci/azure-pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index cc61788850..1c067ef496 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -69,6 +69,11 @@ jobs: **\$(buildConfiguration)\**\*.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' From 4d446e147f0942c9d9b214fbf999a38f1a3a80b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20L=C3=B3pez?= Date: Sun, 20 Feb 2022 14:29:35 +0100 Subject: [PATCH 5/7] Upgraded MSTestTestAdapter and MSTestTestFramework --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 8ec519fae8..e660305aa6 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -28,8 +28,8 @@ 4.4.2 2.6.2 1.3.5 - 2.1.1 - 2.1.1 + 2.2.8 + 2.2.8 12.0.3 2.1.0 1.26.0 From b89ef221da8c40af1883c59e86a42b56fc3b6f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20L=C3=B3pez?= Date: Sun, 20 Feb 2022 14:32:03 +0100 Subject: [PATCH 6/7] Changed MSBuild configuration (Unit Tests building) to Debug --- ci/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 1c067ef496..33e826d8e7 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -57,7 +57,7 @@ jobs: displayName: 'Build Unit Tests' inputs: solution: '$(testProject)' - configuration: '$(buildConfiguration)' + configuration: 'Debug' msbuildArguments: '/t:build /restore' maximumCpuCount: true From 7ed885f9451cdaf01f016d3d0c45797229984015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20L=C3=B3pez?= Date: Sun, 20 Feb 2022 18:56:42 +0100 Subject: [PATCH 7/7] Fixed "Run Unit Tests" .appxrecipe path --- ci/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 33e826d8e7..4b86e71d4c 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -66,7 +66,7 @@ jobs: inputs: testSelector: 'testAssemblies' testAssemblyVer2: | - **\$(buildConfiguration)\**\*.Tests.build.appxrecipe + **\Debug\**\*.Tests.build.appxrecipe !**\obj\** searchFolder: '$(System.DefaultWorkingDirectory)' otherConsoleOptions: '/Framework:FrameworkUap10'