Skip to content

Commit

Permalink
feat(ci): report test result to codecov (#47)
Browse files Browse the repository at this point in the history
Signed-off-by: Cattī Crūdēlēs <[email protected]>
  • Loading branch information
wzy9607 authored Aug 18, 2024
1 parent 3dc7efe commit 79ff168
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Test
run: go test ./... -coverprofile=./coverage.txt -covermode=atomic -coverpkg=./...
run: gotestsum --junitfile junit.xml --format testname -- -json -coverpkg=./... -coverprofile=./coverage.txt -covermode=atomic ./...
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-race:
name: test-race
runs-on: ubuntu-latest
Expand Down

0 comments on commit 79ff168

Please sign in to comment.