-
Notifications
You must be signed in to change notification settings - Fork 805
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
Add a make pr
target for an easy "do automated checks for PR" command
#5670
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Groxx
requested review from
Shaddoll,
neil-xie,
davidporter-id-au,
shijiesheng,
agautam478,
jakobht,
3vilhamster,
sankari165,
dkrotx,
taylanisikdemir and
demirkayaender
as code owners
February 16, 2024 22:57
Groxx
commented
Feb 16, 2024
Comment on lines
794
to
+798
help: | ||
$Q # print help first, so it's visible | ||
$Q # print help and PR first, so they're highly visible | ||
$Q printf "\033[36m%-20s\033[0m %s\n" 'help' 'Prints a help message showing any specially-commented targets' | ||
$Q printf "\033[36m%-20s\033[0m %s\n" 'pr' 'Refresh all code, to ensure your PR can reach tests. Recommended before opening a github PR.' | ||
$Q echo '-----------------------------------' |
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.
Resulting output:
❯ make
help Prints a help message showing any specially-commented targets
pr Refresh all code, to ensure your PR can reach tests. Recommended before opening a github PR.
-----------------------------------
bins Make all binaries
build Build all packages and all tests (ensures everything compiles)
clean Clean build products
copyright update copyright headers
deps Check for dependency updates, for things that are directly imported
deps-all Check for all dependency updates
fmt run gofmt / organize imports / etc
go-generate run go generate to regen mocks, enums, etc
lint (re)run the linter
release Re-generate generated code and run tests
test Build and run all tests. This target is for local development. The pipeline is using cover_profile target
tidy go mod tidy all packages
Pull Request Test Coverage Report for Build 018db42b-2fe7-4cfe-adc6-e9d4466a0c24Details
💛 - Coveralls |
davidporter-id-au
approved these changes
Feb 16, 2024
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, appreciated
Groxx
changed the title
Add a
Add a Feb 17, 2024
make pr
target for an easy "do automated checks for PR" commnadmake pr
target for an easy "do automated checks for PR" command
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We already have a fair number of quicker and more focused commands, but they can be hard to remember to run / remember when to run.
So now we have one command that should do everything that's reasonably quick:
make pr
(it still takes a couple minutes)
I've avoided adding tests to this because tests take quite a lot longer and aren't totally isolated / setup-free,
and tbh I tend to just push tests to CI because it's more comprehensive anyway.
Arguably (quick, stable) unit tests should be included though, and if we can figure out a safe set to run it'd be easy to add.
This same command will also be added to the client repo, as it has similar needs, and if/when we add submodules
there we'll need a
make tidy
and possibly other things too. Better to standardize on something simple.