From 5ea71e36a0cf83ab89d29b405b6bad972eeebd20 Mon Sep 17 00:00:00 2001 From: Christian Banse Date: Mon, 10 Apr 2023 10:23:00 +0200 Subject: [PATCH] Added coverage reporting (#304) Co-authored-by: Michael Fridman --- .github/workflows/build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97e9b4f7..0ab081f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,8 +32,23 @@ jobs: fi - name: Build run: | - go install github.com/mfridman/tparse@latest + go install github.com/mfridman/tparse@latest go vet ./... 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 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