diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index ef8187b..09445fb 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -33,7 +33,7 @@ jobs: run: go mod tidy - name: Test with Coverage - run: go test ./... -coverprofile=coverage.out -covermode=atomic + run: go test -coverprofile=coverage.out -covermode=atomic ./... - name: Check Coverage run: | @@ -47,6 +47,18 @@ jobs: env: GO111MODULE: on + - name: Install gocover-cobertura + run: go install github.com/boumenot/gocover-cobertura@latest + + - name: Convert coverage to Cobertura format + run: gocover-cobertura < coverage.out > coverage.xml + + - name: Upload coverage to Coveralls + uses: coverallsapp/github-action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: coverage.xml + - name: Install golangci-lint run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest