commit 787daa01853d0833c3da7839a8518f101f69752f parent e3d46f17f3f72d33fcf91cc6f6cbe66913f6c722 Author: Brian C. Lane <bcl@users.noreply.github.com> Date: Sat, 7 Mar 2020 09:19:56 -0800 Add coverage report Using coveralls.io and goveralls Diffstat:
A | .github/workflows/main.yml | | | 29 | +++++++++++++++++++++++++++++ |
1 file changed, 29 insertions(+), 0 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: Coverage +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + test: + name: Test with Coverage + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: '1.14' + - name: Check out code + uses: actions/checkout@v2 + - name: Install dependencies + run: | + go mod download + - name: Run Unit tests + run: | + go test -race -covermode atomic -coverprofile=profile.cov ./... + - name: Send coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + GO111MODULE=off go get github.com/mattn/goveralls + $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github