-
Notifications
You must be signed in to change notification settings - Fork 309
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
feat: add pre-commit hook support #1077
base: master
Are you sure you want to change the base?
Conversation
ff1ef48
to
5f85c11
Compare
@@ -73,6 +73,15 @@ jobs: | |||
- name: unit test | |||
run: make test | |||
|
|||
- name: setup python |
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.
Why does the conftest repo need to install this in the PR flow?
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.
This is not a requirement, but without it the workflow will use the Python version that's bundled with the CI runner to install pre-commit. The Python version might change and possibly cause issues in the pipeline. Not sure if there's already loose dependencies like this to the CI runner binaries/versions?
82f5e16
to
40d784f
Compare
I'll add a separate "conftest-test" and "conftest-verify" hooks to cover both cases. Will mark this as a draft until done later today! EDIT: done :) |
Add pre-commit integration to validate configurations against OPA policies: - Create .pre-commit-hooks.yaml with conftest test/verify hook configs - Add pre-commit hook tests using bats - Install pre-commit in CI workflow Signed-off-by: Ville Vesilehto <[email protected]>
40d784f
to
cb3ad26
Compare
Add pre-commit integration to validate configurations against OPA policies:
Fixes #1011