ci: add test results codecov (#554)

* ci: add test results codecov

* add go-junit-report with go tool directive
This commit is contained in:
Alexis Couvreur
2025-03-09 19:17:53 -04:00
committed by GitHub
parent 7a885ebd5f
commit 8122a888b1
3 changed files with 16 additions and 3 deletions

View File

@@ -33,9 +33,15 @@ jobs:
run: go build -v .
- name: Test
run: go test -v -race -covermode atomic -coverprofile coverage.txt ./...
run: go test -v -json -race -covermode atomic -coverprofile coverage.txt ./... 2>&1 | go tool go-junit-report -parser gojson > junit.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true
use_oidc: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}