Skip to content

Conversation

@michaelpeterswa
Copy link
Member

No description provided.

Comment on lines +60 to +63
run: |
find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname \
| xargs -n1 -I{} bash -c "pushd {}; go test -coverprofile=coverage.txt --race -v ./..." \
| tee >(go-junit-report -set-exit-code > junit_report.xml)
Copy link
Contributor

@23caterpie 23caterpie May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm over simplifying this, but instead of piping into junit at all, why not just run it on it's own line to get all the outputs? Or does junit need the output? I assumed it looked at the coverage output file.

Suggested change
run: |
find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname \
| xargs -n1 -I{} bash -c "pushd {}; go test -coverprofile=coverage.txt --race -v ./..." \
| tee >(go-junit-report -set-exit-code > junit_report.xml)
run: |
find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname \
| xargs -n1 -I{} bash -c "pushd {}; go test -coverprofile=coverage.txt --race -v ./..."
go-junit-report -set-exit-code > junit_report.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants