diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4f58f10..d3517816 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,3 +23,6 @@ jobs: go-version: ${{ matrix.go }} - run: make test-nodocker + + - if: matrix.go == '1.15' + run: bash <(curl -s https://codecov.io/bash) diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..1273da77 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/coverage*.txt diff --git a/Makefile b/Makefile index 801f1d4d..39e9848c 100644 --- a/Makefile +++ b/Makefile @@ -52,12 +52,12 @@ test-examples: go build -o /dev/null ./examples/... test-pkg: - go test -race -v ./pkg/... + go test -v -race -coverprofile=coverage-pkg.txt ./pkg/... test-root: $(foreach IMG,$(shell echo testimages/*/ | xargs -n1 basename), \ docker build -q testimages/$(IMG) -t gortsplib-test-$(IMG)$(NL)) - go test -race -v . + go test -v -race -coverprofile=coverage-root.txt . test-nodocker: test-examples test-pkg test-root diff --git a/README.md b/README.md index c77bbaff..284a1913 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Test](https://github.com/aler9/gortsplib/workflows/test/badge.svg)](https://github.com/aler9/gortsplib/actions?query=workflow:test) [![Lint](https://github.com/aler9/gortsplib/workflows/lint/badge.svg)](https://github.com/aler9/gortsplib/actions?query=workflow:lint) +[![CodeCov](https://codecov.io/gh/aler9/gortsplib/branch/main/graph/badge.svg)](https://codecov.io/gh/aler9/gortsplib/branch/main) [![PkgGoDev](https://pkg.go.dev/badge/github.com/aler9/gortsplib)](https://pkg.go.dev/github.com/aler9/gortsplib#pkg-index) RTSP 1.0 client and server library for the Go programming language, written for [rtsp-simple-server](https://github.com/aler9/rtsp-simple-server).