ci: add junit report

This commit is contained in:
Antoine Aflalo
2024-08-27 10:35:04 -04:00
parent 48a018c99d
commit 990c6e11d1

View File

@@ -19,10 +19,14 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: go mod tidy run: go mod tidy
- name: Install Junit reporter
run: go get -u github.com/jstemmer/go-junit-report/v2
- name: Run tests - name: Run tests
run: go test ./... -v -coverprofile=coverage.txt run: go test -v 2>&1 ./... -coverprofile=coverage.txt | go-junit-report -set-exit-code > junit.xml
- name: Upload results to Codecov - name: Upload results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@v4
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}