Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .pipelines/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,21 @@ jobs:
go get github.com/docker/libnetwork/driverapi
go get github.com/gorilla/mux
go get github.com/jstemmer/go-junit-report
go get github.com/axw/gocov/gocov
go get github.com/AlekSi/gocov-xml
go get -u gopkg.in/matm/v1/gocov-html
workingDirectory: '$(modulePath)'
displayName: 'Install Go dependencies'

- script: |
# sudo -E env "PATH=$PATH" go test -v ./cns/restserver/ -coverprofile coverage-restserver.out
set -o pipefail
set -e
sudo -E env "PATH=$PATH" make test-all 2>&1 | tee >(go-junit-report > report.xml)
bash <(curl -s https://codecov.io/bash)
gocov convert coverage.out > coverage.json
gocov-xml < coverage.json > coverage.xml
mkdir coverage
gocov-html < coverage.json > coverage/index.html
workingDirectory: '$(modulePath)'
displayName: 'RunTest'

Expand All @@ -64,6 +70,13 @@ jobs:
testResultsFiles: $(System.DefaultWorkingDirectory)/**/report.xml
condition: always()

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml
reportDirectory: $(System.DefaultWorkingDirectory)/**/coverage
condition: always()

- script: |
export GOOS=linux
sudo -E env "PATH=$PATH" make all-binaries
Expand Down