Skip to content

Commit

Permalink
add codecoveage with codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdoc committed May 7, 2024
1 parent d074cd4 commit 4c5c266
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 4c5c266

Please sign in to comment.