From 3ed8f3bd06d4f3964106686c3c72009b6aa5dbea Mon Sep 17 00:00:00 2001 From: Rath Rene Date: Sun, 1 Oct 2023 23:57:06 +0200 Subject: [PATCH] test coverage --- .github/workflows/test.yml | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad66346..c6eb398 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,3 +34,12 @@ jobs: cd lib/ go test -v ./... shell: bash + + - name: Run coverage + run: | + cd lib/ + go test ./... -race -coverprofile=coverage.out -covermode=atomic + shell: bash + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 diff --git a/README.md b/README.md index 5095b91..b5bcd34 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Unit Tests](https://github.com/superstes/calamary/actions/workflows/test.yml/badge.svg?branch=latest)](https://github.com/superstes/calamary/actions/workflows/test.yml) +[![Test Coverage](https://codecov.io/gh/superstes/calamary/graph/badge.svg?token=UD4TM8N256)](https://codecov.io/gh/superstes/calamary) [![Lint](https://github.com/superstes/calamary/actions/workflows/lint.yml/badge.svg?branch=latest)](https://github.com/superstes/calamary/actions/workflows/lint.yml) -[![Docs](https://readthedocs.org/projects/calamary/badge/?version=latest)](https://docs.calamary.net/en/latest/?badge=latest) +[![Documentation](https://readthedocs.org/projects/calamary/badge/?version=latest)](https://docs.calamary.net/en/latest/?badge=latest) # Calamary - Forwarding- & Filtering-Proxy