Add junit reports to CI
Trying to get familiar with the go ecosystem a bit and thought I'd try this here. Not sure it's really the best way. I wanted to simplify installing tools - I was a bit surprised dependency management for dev tools in Go still needs to be managed in Makefiles when there's already go modules. I tried to combine what I saw in gitlab-pages (simpler runs without wrapper scripts) and gitlab-runner (combining out/cover
and out/junit
in a common dir) as well as https://marcofranssen.nl/manage-go-tools-via-go-modules/.
I thought that if you find this approach valid, the rest of dev tools could be managed the same way outside of makefiles perhaps, https://gitlab.com/gitlab-org/release-cli/-/blob/fca01c4859779b9fd75630f3193f2560ae7880f2/Makefile.util.mk#L54-91 (Edit: ah I see versioning is broken for mockery via go install :/).
I kept the junit generation in the test target as this way it reports non-zero correctly without having to mess with the lack of pipefail in some shells while keeping live stdout - I think the current approach in gitlab-pages doesn't report non-zero on failure? https://gitlab.com/gitlab-org/gitlab-pages/-/blob/21066de52d7f7af759bdf2395694c935110da1bb/Makefile.util.mk#L12-14. Also not sure if the approach I took with always including clean+setup for all tools adds too much overhead :)
Closes #12 (closed).
/cc @jaime