Browse Source

:robot: Add codecov

Ettore Di Giacinto 3 years ago
parent
commit
2e841e6c25
2 changed files with 8 additions and 3 deletions
  1. 3 2
      .github/tests.sh
  2. 5 1
      .github/workflows/test.yml

+ 3 - 2
.github/tests.sh

@@ -5,8 +5,9 @@ set -ex
 GO111MODULE=off go get github.com/onsi/ginkgo/ginkgo
 GO111MODULE=off go get github.com/onsi/gomega/...
 
-go test -race ./pkg/...
 
 ./edgevpn api &
 
-TEST_INSTANCE="http://localhost:8080" go test ./api/client
+export TEST_INSTANCE="http://localhost:8080"
+
+go test -coverprofile=coverage.txt -covermode=atomic -race ./pkg/... ./api/client

+ 5 - 1
.github/workflows/test.yml

@@ -66,7 +66,11 @@ jobs:
               sudo sysctl -w net.core.rmem_max=2500000
               chmod +x edgevpn
               EDGEVPNCONFIG=config.yaml ./.github/tests.sh
-
+      - name: Codecov
+        uses: codecov/[email protected]
+        with:
+          file: coverage.txt
+          
   vpntest:
     runs-on: ubuntu-latest
     needs: build