diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8d08c51..a8a7e66 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,8 +7,7 @@ on: branches: [ main ] jobs: - - build: + build-test-coverage: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -28,3 +27,14 @@ jobs: - name: Test run: go1.18beta1 test -v ./... + + - name: Calcualte coverage + run: | + go1.18beta1 test -v -covermode=count -coverprofile=coverage.out + - name: Convert coverage.out to coverage.lcov + uses: jandelgado/gcov2lcov-action@v1.0.6 + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.github_token }} + path-to-lcov: coverage.lcov \ No newline at end of file diff --git a/README.md b/README.md index 7ef0f1d..5e86797 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # go-tuple: Generic tuples for Go 1.18. [![Go](https://github.com/barweiss/go-tuple/actions/workflows/go.yml/badge.svg)](https://github.com/barweiss/go-tuple/actions/workflows/go.yml) +[![Coverage Status](https://coveralls.io/repos/github/barweiss/go-tuple/badge.svg)](https://coveralls.io/github/barweiss/go-tuple) Go 1.18 tuple implementation.