diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 730c96a..40399c6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,9 +20,17 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.23' + + - name: Install dependencies + run: go mod tidy - - name: Build - run: go build -v ./... + - name: Run tests with coverage + run: go test -v -coverprofile=coverage.txt ./... - - name: Test - run: go test -v ./... + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.txt + flags: unittests + fail_ci_if_error: true