-
Notifications
You must be signed in to change notification settings - Fork 2
ci: gate build and test jobs on pre-commit and lint checks #84
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
Changes from all commits
b0dbec6
e9e821b
1001409
fd22025
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,31 @@ on: | |
| pull_request: | ||
|
|
||
| jobs: | ||
| precommit: | ||
| name: Pre-commit Gate | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: j178/prek-action@v2 | ||
|
|
||
| lint-gate: | ||
| name: Lint Gate | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: setup Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: golangci-lint | ||
| uses: golangci/golangci-lint-action@v9 | ||
| with: | ||
| version: latest | ||
| only-new-issues: true | ||
|
Comment on lines
+10
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant Per Recommendation: pick one source of truth. Either
If you keep both, at minimum align the golangci-lint version between them. 🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This workflow triggers on both 🤖 Prompt for AI Agents |
||
|
|
||
| can-read-secret: | ||
| name: Can Read Secret | ||
| runs-on: ubuntu-latest | ||
|
|
@@ -24,6 +49,7 @@ jobs: | |
|
|
||
| build-ui: | ||
| name: User Interface Build | ||
| needs: [precommit, lint-gate] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
@@ -55,6 +81,7 @@ jobs: | |
|
|
||
| build-cli: | ||
| name: Build CLI Binary on ${{ matrix.runner }} | ||
| needs: [precommit, lint-gate] | ||
| strategy: | ||
| matrix: | ||
| include: | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 289
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 560
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 1837
Pin
golangci-lintto a specific version to ensure reproducible CI.Using
version: latestmakes CI non-deterministic: an upstream release can fail previously-green PRs without any code changes. Pin tov2.11.4to match the version already declared in.pre-commit-config.yaml, ensuring consistent linting across both pre-commit and CI gates.Proposed change
- name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: latest + version: v2.11.4 only-new-issues: true📝 Committable suggestion
🤖 Prompt for AI Agents