[ci] Add coverage report (#204)

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
Julian Strobl 2023-11-29 08:08:23 +01:00 committed by GitHub
parent 55157301e5
commit d5339f331c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,4 +59,8 @@ jobs:
run: (golangci-lint run && cd lib && golangci-lint run)
- name: Run tests
run: go test -race -vet=off ./...
run: |
# Exclude generated .pb.go and .pb.gw.go files from test and coverage
go test -coverprofile cover.out -race -vet=off -v $(go list ./... | grep -v types)
# Print coverage by function
go tool cover -func=cover.out