mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-22 02:58:02 +02:00
add coveralls (#2279)
This commit is contained in:
parent
b1d7a126ab
commit
b162307a96
2 changed files with 59 additions and 13 deletions
45
.github/workflows/test.yaml
vendored
45
.github/workflows/test.yaml
vendored
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue