ci: try coveralls github action

This commit is contained in:
Aleksandr Razumov
2020-11-01 19:01:01 +03:00
parent f5f4fe320a
commit 65dbf4967c
3 changed files with 8 additions and 3 deletions

View File

@@ -78,3 +78,10 @@ jobs:
${{ runner.os }}-go-${{ matrix.golang }}- ${{ runner.os }}-go-${{ matrix.golang }}-
- name: Run tests - name: Run tests
run: make test run: make test
- 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

2
.gitignore vendored
View File

@@ -9,7 +9,5 @@ cmd/stun-cli/stun-cli
cmd/stun-decode/stun-decode cmd/stun-decode/stun-decode
cmd/stun-bench/stun-bench cmd/stun-bench/stun-bench
coverage.txt
e2e/dump.pcap e2e/dump.pcap
e2e/log-*.txt e2e/log-*.txt

View File

@@ -18,7 +18,7 @@ go test -race -cpu=1,2,4 -run TestClient_DoConcurrent
for d in $(go list ./... | grep -v vendor); do for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic "$d" go test -race -coverprofile=profile.out -covermode=atomic "$d"
if [[ -f profile.out ]]; then if [[ -f profile.out ]]; then
cat profile.out >> coverage.txt cat profile.out >> coverage.out
rm profile.out rm profile.out
fi fi
done done