-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,17 +48,21 @@ jobs: | |
run: go test -v -coverpkg=./... -race -timeout 3m -coverprofile=coverage.out ./... | ||
- name: Run Go unit tests for the generation CLI | ||
run: | | ||
cd cmd/ndc-go-sdk | ||
go test -v -coverpkg=./... -race -timeout 3m -coverprofile=../../coverage.out ./... | ||
pushd cmd/ndc-go-sdk | ||
go test -v -coverpkg=./... -race -timeout 3m -coverprofile=../../coverage-codegen.out ./... | ||
popd | ||
- name: Run Go unit tests for the generation example | ||
run: | | ||
cd example/codegen | ||
go test -v -coverpkg=./... -race -timeout 3m -coverprofile=../../coverage.out ./... | ||
pushd example/codegen | ||
go test -v -coverpkg=./... -race -timeout 3m -coverprofile=../../coverage-codegen-example.out ./... | ||
popd | ||
- name: Go coverage format | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: | | ||
go get github.com/boumenot/gocover-cobertura | ||
go install github.com/boumenot/gocover-cobertura | ||
sed '1d' coverage-codegen.out >> coverage.out | ||
sed '1d' coverage-codegen-example.out >> coverage.out | ||
gocover-cobertura < coverage.out > coverage.xml | ||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
|