ci: add missing tools for pre-commit checks#273
Open
evacchi wants to merge 2 commits into
Open
Conversation
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the “Pre-commit” GitHub Actions workflow to better match local pre-commit behavior by installing missing tooling in CI, so optional hooks that depend on external binaries can actually run.
Changes:
- Extend
.github/workflows/pre-commit.ymlto install Helm and Go-based tooling (goimports/gosec) before runningpre-commit. - Add a
golangci-lintaction step and additional post–pre-commit checks (integration tests + Helm lint). - Minor import-block whitespace change in
cmd/main.go.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
cmd/main.go |
Import block whitespace tweak (formatting-only change). |
.github/workflows/pre-commit.yml |
Installs additional tools and expands the pre-commit CI workflow scope with extra lint/test steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/checkout@v7 |
Comment on lines
+36
to
+40
| - name: Run golangci-lint | ||
| uses: golangci/golangci-lint-action@v9 | ||
| with: | ||
| version: v2.11.4 | ||
|
|
Comment on lines
+31
to
+34
| - name: Install Go tools (goimports, gosec) | ||
| run: | | ||
| go install golang.org/x/tools/cmd/goimports@latest | ||
| go install github.com/securego/gosec/v2/cmd/gosec@latest |
Comment on lines
+44
to
+48
| - name: Run integration tests | ||
| run: make test-integration | ||
|
|
||
| - name: Lint Helm chart | ||
| run: helm lint charts/async-processor |
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Collaborator
Author
|
I think now we have consolidated ci-pr-checks into pre-commit so we only have one tool |
This file contains hidden or 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
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.
What does this PR do?
a few checks are not being run on
pre-commitbecause some formatting/linting tools are not installed on CI; there are also 2 separate jobs that partially overlap (pre-commit and ci-pr-check): we should consolidate these.Why is this change needed?
pre-commitrun is incomplete and diverges from a local workflowHow was this tested?
Checklist
git commit -s) per DCOmake test)make lint)