Skip to content

Commit

Permalink
Add net core and code coverage results (#77)
Browse files Browse the repository at this point in the history
#### Why I did it

Publish code coverage results

#### How I did it

Modify azure pipeline yml file to install net core and publish code coverage results via Cobertura

#### How to verify it

Check code coverage
  • Loading branch information
zbud-msft authored Feb 24, 2023
1 parent 984bc6d commit 5d6c47f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'

0 comments on commit 5d6c47f

Please sign in to comment.