git » dnss » commit 1ba973f

github: Upload coverage results to codecov

author Alberto Bertogli
2023-08-04 01:05:48 UTC
committer Alberto Bertogli
2023-08-06 09:48:47 UTC
parent 9d122e0c9393cbe2795a91b3a399c90c30968ca9

github: Upload coverage results to codecov

.github/workflows/tests.yaml +9 -0
README.md +2 -1

diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 41bd0c0..9ff6339 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -40,3 +40,12 @@ jobs:
           docker build -t dnss-test -f tests/Dockerfile .
       - name: Run tests
         run: docker run --name test1 dnss-test
+      - name: Extract coverage results
+        run: >
+          docker cp test1:/go/src/blitiri.com.ar/go/dnss/.coverage/merged.out
+          .
+      - name: Upload coverage results
+        uses: codecov/codecov-action@v3
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          file: merged.out
diff --git a/README.md b/README.md
index dec08a2..1b860d6 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,9 @@ on laptops and small/home networks.
 
 It can also act as a DoH server, in case you want end to end control.
 
-[![Tests status](https://github.com/albertito/dnss/actions/workflows/tests.yaml/badge.svg?branch=master)](https://github.com/albertito/dnss/actions)
+[![Tests](https://github.com/albertito/dnss/actions/workflows/tests.yaml/badge.svg)](https://github.com/albertito/dnss/actions/workflows/tests.yaml)
 [![Go Report Card](https://goreportcard.com/badge/github.com/albertito/dnss)](https://goreportcard.com/report/github.com/albertito/dnss)
+[![Coverage](https://codecov.io/github/albertito/dnss/branch/next/graph/badge.svg?token=9beu58pgFX)](https://codecov.io/github/albertito/dnss)
 
 
 ## Features