From 956eaf75c578dcdfed2a9374a3e9f786b6a79ab6 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Tue, 19 Jan 2021 11:56:33 +0000 Subject: [PATCH] Try actually running the tests under .net core --- .../LibZipSharp.UnitTest.csproj | 6 ++-- azure-pipelines.yml | 36 +++++++++++++++---- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj b/LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj index 92847be8..10877ded 100644 --- a/LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj +++ b/LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj @@ -1,8 +1,6 @@  - - net471 - $(TargetFrameworks);netcoreapp3.1 + net471;netcoreapp3.1 false true @@ -10,6 +8,8 @@ $(DefineConstants);WINDOWS + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a2426eb4..13b5e3c5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -94,7 +94,7 @@ stages: - buildlinux - buildWindows pool: - vmImage: macOS-10.14 + vmImage: macOS-latest steps: - bash: | brew tap xamarin/xamarin-android-windeps @@ -194,6 +194,12 @@ stages: inputs: artifactName: NuGet downloadPath: $(Build.SourcesDirectory) + - task: MSBuild@1 + displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' + inputs: + solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj + configuration: Release + msbuildArguments: /restore /p:ReferenceNuget=True /v:diag - task: MSBuild@1 displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' inputs: @@ -204,12 +210,11 @@ stages: displayName: "Run Tests under .net Core" inputs: command: test - projects: 'LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' - arguments: '--configuration Release --framework netcoreapp3.1 --no-build' + arguments: 'LibZipSharp.UnitTest/bin/Release/netcoreapp3.1/LibZipSharp.UnitTest.dll' - job: testmacos displayName: 'Test MacOS' pool: - vmImage: macOS-10.14 + vmImage: macOS-latest steps: - template: yaml-templates/use-dot-net.yaml parameters: @@ -219,16 +224,27 @@ stages: inputs: artifactName: NuGet downloadPath: $(Build.SourcesDirectory) + - task: MSBuild@1 + displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' + inputs: + solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj + configuration: Release + msbuildArguments: /restore /p:ReferenceNuget=True /v:diag - task: MSBuild@1 displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' inputs: solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj configuration: Release msbuildArguments: /restore /t:RunNunitTests /p:ReferenceNuget=True /v:diag + - task: DotNetCoreCLI@2 + displayName: "Run Tests under .net Core" + inputs: + command: test + arguments: 'LibZipSharp.UnitTest/bin/Release/netcoreapp3.1/LibZipSharp.UnitTest.dll' - job: testwindows displayName: 'Test Windows' pool: - vmImage: windows-2019 + vmImage: windows-latest steps: - template: yaml-templates/use-dot-net.yaml parameters: @@ -240,6 +256,12 @@ stages: downloadPath: $(Build.SourcesDirectory) - task: MSBuild@1 displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' + inputs: + solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj + configuration: Release + msbuildArguments: /restore /p:ReferenceNuget=True /v:diag + - task: MSBuild@1 + displayName: 'Run Tests LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' inputs: solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj configuration: Release @@ -248,8 +270,8 @@ stages: displayName: "Run Tests under .net Core" inputs: command: test - projects: 'LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj' - arguments: '--configuration Release --framework netcoreapp3.1 --no-build' + arguments: 'LibZipSharp.UnitTest\bin\Release\netcoreapp3.1\LibZipSharp.UnitTest.dll +' - stage: Publish dependsOn: Test condition: eq(variables['System.TeamProject'], 'devdiv') # only sign the packages when running on Windows, and using the private server which has the certificates