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 diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..f28b638 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,4 @@ +codecov: + require_ci_to_pass: no + +comment: false