From 9acd1ab567a3f708323e500266165e5e96c299da Mon Sep 17 00:00:00 2001 From: zbud-msft Date: Thu, 23 Feb 2023 18:20:26 +0000 Subject: [PATCH] Add net core and code coverage results --- azure-pipelines.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 97070785..cac53729 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -78,6 +78,15 @@ stages: sudo dpkg -i ../target/debs/buster/libyang*1.0.73*.deb displayName: "Install dependency" + - script: | + set -ex + # Install .NET CORE + curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - + sudo apt-add-repository https://packages.microsoft.com/debian/10/prod + sudo apt-get update + sudo apt-get install -y dotnet-sdk-5.0 + displayName: "Install .NET CORE" + - script: | set -ex ls -l @@ -93,7 +102,17 @@ stages: dpkg-buildpackage -rfakeroot -us -uc -b -j$(nproc) && cp ../*.deb $(Build.ArtifactStagingDirectory)/ displayName: "Build" + - script: | + pushd sonic-gnmi + make check + displayName: "Test" + - publish: $(Build.ArtifactStagingDirectory)/ artifact: sonic-telemetry displayName: "Archive artifacts" + - task: PublishCodeCoverageResults@1 + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: '$(System.DefaultWorkingDirectory)/sonic-gnmi/coverage.xml' + displayName: 'Publish coverage'