-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc CI improvements #3001
Misc CI improvements #3001
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
821b89f
to
b20f659
Compare
b20f659
to
730e08d
Compare
730e08d
to
65d6f84
Compare
This has not been used since we migrated to Travis. Signed-off-by: Stephen Finucane <[email protected]>
...to ensure we set the GOFLAGS correctly. Signed-off-by: Stephen Finucane <[email protected]>
Well, mostly consistent: the acceptancetest script needs some special treatment due to DevStack being weird. Signed-off-by: Stephen Finucane <[email protected]>
I'm guessing this was here to ensure we respected the exit code of the 'go test' invocation. We now do this through the appropriate use of 'set' so we no longer need to use 'exec'. Signed-off-by: Stephen Finucane <[email protected]>
We now use 'go vet' in CI, which includes import checks. Since we don't want to *fix* these failures in CI - merely report them - this is a better choice. Drop 'goimports' in favour of 'gofmt'. Signed-off-by: Stephen Finucane <[email protected]>
I often see failing "unit tests" only to discover the actual failures are linter related. Move these linter jobs to a separate workflow to avoid this confusion going forward. Signed-off-by: Stephen Finucane <[email protected]>
This is already run as part of the 'unit' workflow. Signed-off-by: Stephen Finucane <[email protected]>
Now that we skip tests that require optional features or extensions, we can use standard module discovery rather than a glob of bash to run our tests. Signed-off-by: Stephen Finucane <[email protected]>
Signed-off-by: Stephen Finucane <[email protected]>
This isn't necessary since Go 1.16 [1]. [1] https://maelvls.dev/go111module-everywhere/ Signed-off-by: Stephen Finucane <[email protected]>
65d6f84
to
f2c3732
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
This started out as a series to add a
go vet
task to our CI jobs but transformed into a much larger PR to fix complaints I had with out current CI process 🙂.The main change here is modify our tests so that we do not need so many wrappers around
go test
. This means making consistent use of conditional compilation directives to skip integration tests when running e.g.go test ./...
and adding helper utilities to skip tests that rely on non-standard extensions or deployment configuration. The end result is that it should be possible to mostly usego test
without wrappers going forward (though the wrappers are kept for now).Please look at the individual commits for my rationale behind each change.