Added coverage reporting (#304)

Co-authored-by: Michael Fridman <mf192@icloud.com>
This commit is contained in:
Christian Banse 2023-04-10 10:23:00 +02:00 committed by GitHub
parent b88a60f2d7
commit 5ea71e36a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions

View File

@ -32,8 +32,23 @@ jobs:
fi fi
- name: Build - name: Build
run: | run: |
go install github.com/mfridman/tparse@latest go install github.com/mfridman/tparse@latest
go vet ./... go vet ./...
go test -v -race -count=1 -json -coverpkg=$(go list ./...) ./... | tee output.json | tparse -follow -notests || true go test -v -race -count=1 -json -coverpkg=$(go list ./...) ./... | tee output.json | tparse -follow -notests || true
tparse -format markdown -file output.json -all > $GITHUB_STEP_SUMMARY tparse -format markdown -file output.json -all > $GITHUB_STEP_SUMMARY
go build ./... go build ./...
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
- name: Coverage
run: |
go test -v -covermode=count -coverprofile=coverage.cov ./...
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.cov
format: golang