Skip to content

Commit

Permalink
config: add code-coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwingopalsamy authored Dec 6, 2024
1 parent 958d1a3 commit f68651e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f68651e

Please sign in to comment.