From 4c5c2666573b4525aa2fa813f8c1a9cfa955a9aa Mon Sep 17 00:00:00 2001 From: Christoph Kieslich Date: Tue, 7 May 2024 11:27:52 +0200 Subject: [PATCH] add codecoveage with codecov --- .github/workflows/go.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d311dfa..d6bddf4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,11 +13,10 @@ jobs: with: go-version: ${{ matrix.go-version }} - name: Install dependencies - run: go get . - - name: Test with Go - run: go test -json > TestResults-${{ matrix.go-version }}.json - - name: Upload Go test results - uses: actions/upload-artifact@v4 + run: go mod download + - name: Run coverage + run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 with: - name: Go-results-${{ matrix.go-version }} - path: TestResults-${{ matrix.go-version }}.json + token: ${{ secrets.CODECOV_TOKEN }}