Skip to content

ci: adopt the shared CI - #486

Merged
gusfcarvalho merged 2 commits into
mainfrom
ra/w1-s2-t01-shared-ci
Oct 9, 2026
Merged

gusfcarvalho merged 2 commits into
mainfrom
ra/w1-s2-t01-shared-ci

Conversation

@ccf-lisa

@ccf-lisa ccf-lisa Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Task: W1-S2-T01

Part 1 of 3 of the api onboarding stack (CCF Release Automation Design).

Replaces the repo's CI with a caller of the shared ci-go-service.yml from compliance-framework/workflows, pinned at the v1.5.0 release commit (899dbe5). The status check to require from now on is ci / required.

Removes: .github/workflows/ci.yml (the old CI workflow). It is replaced in place by the new ci.yml caller. No other workflow called it.

What the new caller sets

  • prepare-command: make swag, so the Swagger docs are regenerated before vet, the tests and the make targets, as the old unit and integration jobs did.
  • make-targets: test-integration check-diff.
  • lint-timeout-minutes: 30 (the old lint job ran with --timeout=30m).
  • Triggers: pull_request types [opened, edited, synchronize, reopened, labeled, unlabeled, closed] and pushes to main, as on mock-api.
  • A notify job calling notify-failure.yml with secrets: inherit.

Test race fix

The stack also fixes a pre-existing test race that the new -race flag surfaced: in internal/service/scheduler/scheduler_test.go, mockJob.Execute wrote its executed and execCount fields from overlapping cron goroutines while the test read them (TestCronScheduler_StartStop failed on #487). The fields are now atomic.Bool and atomic.Int32, read with Load(); no non-test code changes. Locally, go test -race -count=20 ./internal/service/scheduler/... passes with the fix and reported the race in 1 of 20 runs without it. A sweep of the other test doubles found none mutated from goroutines the code under test starts.

Old jobs and where they run now

Old job (check name) Old command New check Notes
lint golangci-lint v2.11.4, --timeout=30m, default linters ci / golangci-lint Same golangci-lint version. Reports only issues the change adds (new-from-merge-base). api has no .golangci.yml, so the shared base config applies.
unit-tests make swag then make test ci / go go test -race ./... (the race detector is new), plus gofmt, go vet, a go mod tidy check and go build.
integration-tests make swag then make test-integration ci / make Same make target. The tests start postgres:17.5 through testcontainers; the old job had no workflow services, and the new runner (ubuntu-latest) has Docker too. The old job took about 8 minutes; the make job's timeout is 30.
check-diff make check-diff (PRs only) ci / make Same make target. It now also runs on pushes to main, where the old job was skipped.
(none) ci / common New: PR title check, vulnerability scan and actionlint.

Trigger change: the old workflow also ran on pushes to release-* branches. None exist, and from T02 on, releases are cut from main by release-please, so the new caller runs on main only.

Legacy required checks

The main ruleset requires integration-tests, unit-tests and check-diff, and the classic branch protection requires unit-tests. None of these run after this PR, so they stay pending here. A human removes the ruleset and the classic protection before the stack merges (W1-S2-PRE); this PR does not touch them.

Verified

  • The caller's inputs match ci-go-service.yml at v1.5.0 (prepare-command, make-targets, lint-timeout-minutes).
  • .gitignore covers cover.out, which make test-integration writes before check-diff checks the tree.
  • No other workflow references the old ci.yml.
  • ci / required on this PR's head is the check to read.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 6906901b-bb2f-4cb9-ae13-98dd4a9fdfd6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

gusfcarvalho
gusfcarvalho previously approved these changes Oct 9, 2026
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@ccf-lisa ccf-lisa Bot mentioned this pull request Oct 9, 2026
@ccf-lisa
ccf-lisa Bot added this pull request to stack #489 October 9, 2026 14:16
@gusfcarvalho
gusfcarvalho merged commit 5b7e7e2 into main Oct 9, 2026
18 checks passed
@gusfcarvalho
gusfcarvalho deleted the ra/w1-s2-t01-shared-ci branch October 9, 2026 14:39
gusfcarvalho pushed a commit that referenced this pull request Oct 9, 2026
Task: W1-S2-T02

Part 2 of 3 of the api onboarding stack ([CCF Release Automation
Design](https://claude.ai/code/artifact/39df6ba0-8484-4b08-bfc4-962357843585)).
Stacked on #486.

Adds release-please, run as ccf-release-bot by the shared
`release-please.yml` (pinned at the v1.5.0 release commit, `899dbe5`).

**Removes:** no workflow files. The old tag-push `publish.yml` is
replaced in the next PR of the stack.

## Changes

- `release-please-config.json`: the shared
`release-please/defaults.json` from workflows v1.5.0, copied verbatim
(the shared workflow warns on drift), plus `bootstrap-sha` and one
package `.` with release type `go`.
- `.release-please-manifest.json`: seeded at `0.21.0`, the latest
release.
- `bootstrap-sha` is `0b0cefc` (current `main`, which is also the
`v0.21.0` tag).
- `.github/workflows/release-please.yml`: runs on pushes to `main`,
`secrets: inherit` (the ccf-release-bot secrets come from the repo's
`release` environment once repo-settings applies).
- `ci.yml`: adds the `release-checks` job (checks release PRs only;
skipped, so passing, on any other PR) and adds it to `notify`.

## Expected next version

`v0.21.0` is the current `main` commit, so nothing has landed since the
last release. After this stack merges, release-please sees only the
onboarding commits (all of hidden types), so it opens no release PR yet.
The first feature commit after that proposes `0.22.0` (a breaking change
also gives `0.22.0`, since `bump-minor-pre-major` is on), and the first
fix proposes `0.21.1`.

None of this stack's PR bodies has a line that reads as a conventional
commit, so the squash merges add no extra commits for release-please to
count.

## Before this merges (human)

release-please's first run on `main` needs the `release` environment
secrets, so the repo-settings apply for api must come before this PR
merges (W1-S2-PRE, per-repo order).

## Verified

- Both JSON files parse, and the config has no keys that differ from the
shared defaults.
- api's `go.mod` has no compliance-framework dependencies, so
`release-checks` has no final-dependency check to fail on a release PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: ccf-lisa[bot] <286799724+ccf-lisa[bot]@users.noreply.github.com>
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.

2 participants