mirror of
https://github.com/gortc/stun.git
synced 2025-09-26 20:41:36 +08:00
ci: try coveralls github action
This commit is contained in:
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
@@ -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
2
.gitignore
vendored
@@ -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
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user