OCM-22785 | chore: update git hooks and add local verification scripts#3221
Conversation
087df0c to
d9b837e
Compare
amandahla
left a comment
There was a problem hiding this comment.
Nice addition, left a few comments :)
d9b837e to
5887e1e
Compare
|
/retest-required |
|
/test e2e-presubmits-pr-rosa-hcp-advanced |
5887e1e to
b320429
Compare
| cd "$repo_root" | ||
|
|
||
| required_coverage_percent="80" | ||
| gocovdiff_module="github.com/vearutop/gocovdiff" |
There was a problem hiding this comment.
not a blocker: I think it would be nice adding to the docs that this will be installed/used.
|
@olucasfreitas: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amandahla, BraeTroutman, olucasfreitas The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR Summary
Adds a local, fail-fast verification of the changed code
Detailed Description of the Issue
The goal here is to make sure all the necessary commands run before anything gets committed and possibly into an open PR, so we check linting, build, tests, coverage, etc, also help on test coverage.
Related Issues and PRs
N/AN/AN/AType of Change
Previous Behavior
No local checks that assured or at least gave confidence in the committed code in certain fronts
Behavior After This Change
make install-hooksis the documented, explicit setup step before first commit in a clone.hack/run-checks.shis the shared checks runner with:basicandcommit-messagemodes--dry-runand--list-stepsmake coverage-changed-files(gocovdiff, 80% threshold).make lint,make test, etc.) are the canonical path.README.md,CONTRIBUTE.md, andtests/README.md.How to Test (Step-by-Step)
Preconditions
Test Steps
make install-hooksmake run-checks -- basic --list-stepsmake run-checks -- basic --dry-runmake fmt-checkmake rosamake lintmake test GO_TEST_FLAGS='-count=1'make coverage-changed-filesprintf 'OCM-22785 | chore: verify hook flow\n' > /tmp/valid-msg && ./hack/commit-msg-verify.sh /tmp/valid-msgprintf 'bad commit title\n' > /tmp/invalid-msg && ./hack/commit-msg-verify.sh /tmp/invalid-msgExpected Results
run-checkslist/dry-run outputs planned steps.make rosa,make lint,make test, andmake fmt-checkpass.make coverage-changed-filesexits successfully when threshold conditions are met / no applicable changes.Breaking Changes
Breaking Change Details / Migration Plan
N/A
Developer Verification Checklist
[JIRA-TICKET] | [TYPE]: <MESSAGE>.make testpasses.make lintpasses.make rosapasses.