diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d1a74f4..18581ae 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -78,3 +78,10 @@ jobs: ${{ runner.os }}-go-${{ matrix.golang }}- - name: Run tests 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 diff --git a/.gitignore b/.gitignore index 27481c0..ab9ba7d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,5 @@ cmd/stun-cli/stun-cli cmd/stun-decode/stun-decode cmd/stun-bench/stun-bench -coverage.txt - e2e/dump.pcap e2e/log-*.txt diff --git a/go.test.sh b/go.test.sh index 25234e4..434c6f0 100755 --- a/go.test.sh +++ b/go.test.sh @@ -18,7 +18,7 @@ go test -race -cpu=1,2,4 -run TestClient_DoConcurrent for d in $(go list ./... | grep -v vendor); do go test -race -coverprofile=profile.out -covermode=atomic "$d" if [[ -f profile.out ]]; then - cat profile.out >> coverage.txt + cat profile.out >> coverage.out rm profile.out fi done