Add Github Actions to lint, test and produce code coverage #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When run in CI, the coverage dir is missing for some reason, so
gotestsum won't run properly
Emit junit output from make test-coverage
Since we don't yet have SDLC pipeline projects for Go libraries or
for public projects, add in some limited CI validation for PRs to
this repo including:
A build and test stage that generates binaries with the Makefile
and runs make test-coverage to produce coverage (not currently
used in CI)
Also uploads these as artifacts
Linting through the golangci-lint Github Action
NOTE: intially use dorny/test-reporter which produces Github checks,
which by design doesn't always attach to the right workflow - results
may show up with golangci-lint. See
Test report doesn't appear in expected place in GitHub UI dorny/test-reporter#67
https://github.com/orgs/community/discussions/24616
To resolve this, switch to a fork that uses summary instead:
feat: add output to step summary phoenix-actions/test-reporting#21
Building on the prior CI changes to lint and produce test artifacts,
use the action go-coverage-report to examine the cover.out file
produced to generate a small coverage report