From 363f4d64c3cca9c99ae7786380a499bd13dd3961 Mon Sep 17 00:00:00 2001 From: Malachi Soord Date: Tue, 8 Jun 2021 22:32:31 +0200 Subject: [PATCH] Add coverage --- .github/workflows/go.yml | 10 +++++----- Makefile | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f72cf25..d8b2f24 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,17 +12,17 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go uses: actions/setup-go@v2 with: go-version: ^1.15 - - name: Check out code uses: actions/checkout@v2 - - name: Build run: make build - - name: Test - run: make test + run: make test-with-coverage + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.out diff --git a/Makefile b/Makefile index 4209eb3..53e3cb4 100644 --- a/Makefile +++ b/Makefile @@ -27,3 +27,6 @@ clean: test: go test -tags=unit -timeout=600s -v ./... + +test-with-coverage: + go test -tags=unit -timeout=600s -v ./... -coverprofile=coverage.out