diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 5ce54ba..c3a1a28 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,4 +1,4 @@ -name: Coverage +name: coverage on: push: @@ -17,33 +17,13 @@ jobs: with: go-version: '1.22' - - name: Go Cache - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Download dependencies - run: go mod download - - - name: Run tests and generate coverage - run: | - go test -v -race -coverprofile=coverage.txt -covermode=atomic $(go list ./... | grep -v /example) - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - file: ./coverage.txt - flags: unittests - - name: Install goveralls run: go install github.com/mattn/goveralls@latest - - name: Send coverage to Coveralls + - name: Run tests + run: go test -v -coverprofile=coverage.out $(go list ./... | grep -v /example) + + - name: Send coverage env: COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - run: goveralls -coverprofile=coverage.txt -service=github + run: goveralls -coverprofile=coverage.out -service=github