feat(CC-0003): add minimal GitHub Actions CI workflow#3
Closed
feat(CC-0003): add minimal GitHub Actions CI workflow#3
Conversation
- Add `.github/workflows/ci.yaml` with three parallel jobs (lint, test, test-integration) triggered on push to main and pull_request events - Use golangci-lint-action v9 (v2.10) for lint job, delegating Go setup to the action internally - Run `make test` and `make test-integration` in separate jobs using actions/setup-go with `go-version-file: go.work` for version management and automatic module caching - Pin all GitHub Actions to full 40-character commit SHAs with version comments for supply-chain hardening - Set least-privilege permissions (`contents: read`) and add concurrency group with cancel-in-progress to avoid redundant runs on superseded pushes - Add reference documentation at `docs/ci-workflow.md` covering trigger events, job descriptions, Go setup conventions, concurrency behavior, and project dependencies AI-assisted: Claude Code On-behalf-of: @SAP christian.berendt@sap.com Signed-off-by: Christian Berendt <berendt@23technologies.cloud>
Reviewer's GuideIntroduces a minimal GitHub Actions CI pipeline with three SHA-pinned parallel jobs (lint, unit tests, integration tests) plus reference documentation and planwerk metadata updates, using least-privilege permissions, concurrency controls, and go.work-based Go setup. Sequence diagram for CI workflow concurrency cancellation behaviorsequenceDiagram
actor Developer
participant Repo as GitHubRepository
participant Actions as GitHubActions
participant RunOld as WorkflowRun_old
participant RunNew as WorkflowRun_new
Developer->>Repo: push commit A to main
Repo->>Actions: emit push event (main)
Actions->>RunOld: start CI workflow (group=ref-workflow)
RunOld->>RunOld: execute jobs lint, test, test-integration
Developer->>Repo: push commit B to main
Repo->>Actions: emit push event (main)
Actions->>RunNew: start CI workflow (same group)
Actions->>RunOld: cancel in-progress (concurrency cancel-in-progress=true)
RunNew->>RunNew: execute jobs lint, test, test-integration
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Consider adding
paths/paths-ignorefilters to the workflow triggers so that docs-only or non-Go changes don’t unnecessarily run the full CI pipeline. - It may be useful to set explicit
timeout-minutesvalues on each job (lint, test, test-integration) to avoid hanging runs consuming runners indefinitely if something stalls.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding `paths` / `paths-ignore` filters to the workflow triggers so that docs-only or non-Go changes don’t unnecessarily run the full CI pipeline.
- It may be useful to set explicit `timeout-minutes` values on each job (lint, test, test-integration) to avoid hanging runs consuming runners indefinitely if something stalls.
## Individual Comments
### Comment 1
<location path=".github/workflows/ci.yaml" line_range="38-39" />
<code_context>
+ - name: Run unit tests
+ run: make test
+
+ test-integration:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
+ - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
+ with:
+ go-version-file: go.work
+ - name: Run integration tests
+ run: make test-integration
</code_context>
<issue_to_address>
**suggestion (testing):** Adding explicit timeouts for long-running integration tests can prevent stuck workflows.
Since `make test-integration` may depend on external services and could hang, please configure `timeout-minutes` on this job (or the test step) so a stuck run doesn’t block runners indefinitely.
```suggestion
test-integration:
runs-on: ubuntu-latest
timeout-minutes: 30
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Comment on lines
+38
to
+39
| test-integration: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
suggestion (testing): Adding explicit timeouts for long-running integration tests can prevent stuck workflows.
Since make test-integration may depend on external services and could hang, please configure timeout-minutes on this job (or the test step) so a stuck run doesn’t block runners indefinitely.
Suggested change
| test-integration: | |
| runs-on: ubuntu-latest | |
| test-integration: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 |
AI-assisted: Claude Code On-behalf-of: @SAP christian.berendt@sap.com Signed-off-by: Christian Berendt <berendt@23technologies.cloud>
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.
.github/workflows/ci.yamlwith three parallel jobs(lint, test, test-integration) triggered on push to main
and pull_request events
Go setup to the action internally
make testandmake test-integrationin separate jobsusing actions/setup-go with
go-version-file: go.workforversion management and automatic module caching
version comments for supply-chain hardening
contents: read) and addconcurrency group with cancel-in-progress to avoid redundant
runs on superseded pushes
docs/ci-workflow.mdcoveringtrigger events, job descriptions, Go setup conventions,
concurrency behavior, and project dependencies