add coveralls (#2279)

This commit is contained in:
Travis Groth 2021-06-24 17:23:04 -04:00 committed by GitHub
parent b1d7a126ab
commit b162307a96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 13 deletions

View file

@ -48,10 +48,53 @@ jobs:
- name: test
if: runner.os != 'Linux'
run: make test
cover:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: set env vars
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: cache go binaries
uses: actions/cache@v2
id: cache-go-bin
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }}
restore-keys: ${{ runner.os }}-go-bin
- uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: cover
if: runner.os == 'Linux'
run: make cover
- uses: jandelgado/gcov2lcov-action@v1.0.8
name: convert coverage to lcov
with:
infile: coverage.txt
outfile: coverage.lcov
- name: upload to coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
integration:
strategy:
matrix: