Skip to content

feat(CC-0003): add minimal GitHub Actions CI workflow#5

Merged
berendt merged 1 commit intomainfrom
feature/CC-0003
Mar 1, 2026
Merged

feat(CC-0003): add minimal GitHub Actions CI workflow#5
berendt merged 1 commit intomainfrom
feature/CC-0003

Conversation

@berendt
Copy link
Contributor

@berendt berendt commented Mar 1, 2026

  • Add CI workflow (.github/workflows/ci.yaml) triggered on push
    to main and on all pull requests
  • Add lint job using golangci-lint-action v2.10 with 10min timeout
  • Add test job running make test with 15min timeout
  • Source Go version from go.work via actions/setup-go
  • Pin all GitHub Actions to commit SHAs for supply-chain security
  • Set least-privilege permissions (contents: read) at workflow level
  • Configure per-branch concurrency groups with cancel-in-progress
  • Add SPDX Apache-2.0 license header matching project conventions
  • Add reference documentation for CI workflow (docs/reference/)

berendt added a commit that referenced this pull request Mar 1, 2026
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 1, 2026

Reviewer's Guide

Adds a minimal GitHub Actions CI workflow for Go projects with lint and test jobs, pinned action SHAs, least-privilege permissions, concurrency controls, and accompanying reference documentation and planwerk metadata updates.

Sequence diagram for CI workflow execution on GitHub events

sequenceDiagram
  actor Developer
  participant GitHub
  participant Workflow_CI
  participant Job_lint
  participant Job_test
  participant Runner_lint
  participant Runner_test

  Developer->>GitHub: Push to main or open/update PR
  GitHub->>Workflow_CI: Trigger workflow on push or pull_request

  Workflow_CI->>Workflow_CI: Apply permissions contents: read
  Workflow_CI->>Workflow_CI: Apply concurrency group github.ref-github.workflow

  par Run lint job
    Workflow_CI->>Job_lint: Start job lint (timeout 10m)
    Job_lint->>Runner_lint: Provision ubuntu-latest runner
    Runner_lint->>Runner_lint: Run actions/checkout@34e1148
    Runner_lint->>Runner_lint: Run golangci-lint-action@1e7e51e
    Runner_lint-->>Job_lint: Lint results
  and Run test job
    Workflow_CI->>Job_test: Start job test (timeout 15m)
    Job_test->>Runner_test: Provision ubuntu-latest runner
    Runner_test->>Runner_test: Run actions/checkout@34e1148
    Runner_test->>Runner_test: Run actions/setup-go@40f1582 with go-version-file go.work
    Runner_test->>Runner_test: Execute make test
    Runner_test-->>Job_test: Test results
  end

  Job_lint-->>Workflow_CI: Job status (success/failure)
  Job_test-->>Workflow_CI: Job status (success/failure)
  Workflow_CI-->>GitHub: Combined CI status
  GitHub-->>Developer: CI checks reported on commit or PR
Loading

File-Level Changes

Change Details Files
Introduce a minimal GitHub Actions CI workflow with lint and test jobs for the Go codebase.
  • Create CI workflow triggered on pushes to main and on all pull_request events
  • Define parallel lint and test jobs with separate timeouts and no inter-job dependencies
  • Configure lint job to run golangci-lint via golangci-lint-action with version v2.10
  • Configure test job to run make test using Go version sourced from go.work via actions/setup-go
.github/workflows/ci.yaml
Harden the CI workflow with security-focused and operational safeguards.
  • Pin all GitHub Actions to specific commit SHAs for supply-chain security
  • Set top-level least-privilege permissions for GITHUB_TOKEN (contents: read)
  • Configure per-branch concurrency groups with cancel-in-progress to avoid redundant runs
  • Add SPDX Apache-2.0 license header in the workflow file following project conventions
.github/workflows/ci.yaml
Document the CI workflow behavior and record planwerk progress/review metadata.
  • Add reference documentation describing the CI workflow triggers, jobs, Go setup, concurrency, and permissions
  • Update planwerk progress JSON to reflect implementation of this feature
  • Add initial planwerk review JSON entry for this change
docs/reference/ci-workflow.md
.planwerk/progress/CC-0003-a003-add-minimal-github-actions-ci-workflow.json
.planwerk/reviews/CC-0003-a003-add-minimal-github-actions-ci-workflow-review-1.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

- Add CI workflow with parallel lint and test jobs on push to main and
PRs
- Pin all GitHub Actions to commit SHAs for supply-chain security
- Migrate .golangci.yml to v2 format for golangci-lint v2.10
compatibility
- Scope lint targets to workspace modules (internal/common,
operators/c5c3, operators/keystone)
- Set least-privilege permissions (contents: read) and concurrency
groups to cancel superseded runs
- Configure Go version via go.work for consistent toolchain across jobs
- Add reference documentation for CI workflow configuration and
conventions

AI-assisted: Claude Code
On-behalf-of: @SAP christian.berendt@sap.com
Signed-off-by: Christian Berendt <berendt@23technologies.cloud>
@berendt berendt merged commit 1a67805 into main Mar 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant