Skip to content

ci: adopt storage-go's GitHub Actions setup#1

Merged
Xe merged 2 commits into
mainfrom
ci/github-actions-setup
Jun 2, 2026
Merged

ci: adopt storage-go's GitHub Actions setup#1
Xe merged 2 commits into
mainfrom
ci/github-actions-setup

Conversation

@Xe
Copy link
Copy Markdown
Collaborator

@Xe Xe commented Jun 2, 2026

Summary

  • Mirror tigrisdata/storage-go's GitHub Actions setup so objgit gets the same test matrix, supply-chain checks, and automated releases.
  • Adds CI workflows (build/test/staticcheck, zizmor, PR-title lint, DCO), the semantic-release release pipeline, and the local commit hooks that back it.

Details

Workflows (.github/workflows, all SHA-pinned):

  • go.yml — matrix build/test across ubuntu/windows/macos + arm variants, running go vet, go test, and staticcheck on every push and PR. The full OS matrix matters because objgit shells out to git/ssh/ssh-keygen for its protocol tests, so cross-platform regressions are real. A trailing autorelease job dispatches release.yaml on main.
  • zizmor.yml — scans the workflow files for CI misconfig and uploads SARIF; runs only when a workflow changes.
  • lint-pr-titles.yaml — enforces conventional-commit PR titles (what semantic-release reads to pick the version bump).
  • dco_check.yaml — requires Signed-off-by on every PR.
  • pull_request_template.md.

Release tooling:

  • package.json carries the semantic-release config plus commitlint, lint-staged, and prettier. npmPublish is off — this is a Go binary; semantic-release is used purely for tagging/changelog/GitHub releases.
  • release.yaml runs semantic-release on a throwaway release-* branch and opens a release PR (needs the WRITE_GH_TOKEN secret).
  • .husky/{commit-msg,pre-commit} wire commitlint + npm test and lint-staged into git hooks; package-lock.json is committed so npm ci is reproducible.

Build/tooling:

  • Add goimports and staticcheck as go tool directives so the format hook and local linting work without global installs. go mod tidy also dropped a stale self-referential require on the old tangled.org module path left from the org move.
  • Drop the unused embedded s3Client from optRecorder in resilient_test.go — it overrides all nine interface methods directly, so the embed was dead and tripped staticcheck (U1000), which would have made the new pipeline red on first run.

Docs: consolidate agent guidance into AGENTS.md and point CLAUDE.md at it, matching storage-go's layout.

Test plan

  • go build ./...
  • go vet ./...
  • go tool staticcheck ./... — clean
  • go test ./... — all pass
  • commit hooks (commitlint + lint-staged + npm test) verified by the commit itself
  • Action item: set the WRITE_GH_TOKEN repo secret before relying on release.yaml
  • Watch the Windows matrix legs on first run (git/ssh shell-out tests)

Mirror the CI/release pipeline used by tigrisdata/storage-go so objgit
gets the same test matrix, supply-chain checks, and automated releases.

Workflows (.github/workflows), all with SHA-pinned actions:

- go.yml: matrix build/test across ubuntu/windows/macos + arm variants,
  running `go vet`, `go test`, and staticcheck on every push and PR. The
  full OS matrix matters here because objgit shells out to git/ssh/
  ssh-keygen for its protocol tests, so cross-platform regressions are
  real. A trailing `autorelease` job dispatches release.yaml on main so a
  green build can cut a release without manual steps.
- zizmor.yml: scans the workflow files themselves for CI misconfig and
  uploads SARIF; runs only when a workflow changes.
- lint-pr-titles.yaml: enforces conventional-commit PR titles, which is
  what semantic-release reads to decide the version bump.
- dco_check.yaml: requires Signed-off-by on every PR (DCO).
- pull_request_template.md: standard summary/details/test-plan checklist.

Release tooling:

- package.json carries the semantic-release config (commit-analyzer
  release rules, changelog, GitHub release, git asset commit), plus
  commitlint, lint-staged, and prettier so local commits match CI
  expectations. npmPublish is off; this is a Go binary, semantic-release
  is used purely for tagging/changelog/GitHub releases.
- release.yaml runs semantic-release on a throwaway release-* branch and
  opens a release PR (needs the WRITE_GH_TOKEN secret), matching
  storage-go's "release via PR" flow.
- .husky/{commit-msg,pre-commit} wire commitlint + npm test and
  lint-staged into git hooks; package-lock.json is committed so
  `npm ci` in release.yaml is reproducible.
- .prettierignore excludes CLAUDE.md; .gitignore now ignores
  node_modules.

Build/tooling:

- Add goimports and staticcheck as `go tool` directives so the format
  hook (`go tool goimports`) and local linting work without global
  installs, matching storage-go. `go mod tidy` also dropped a stale
  self-referential require on the old tangled.org module path left over
  from the org move.
- Drop the unused embedded s3Client from optRecorder in
  resilient_test.go: it overrides all nine interface methods directly,
  so the embed was dead and tripped staticcheck (U1000), which would
  have made the new pipeline red on its first run.

Docs:

- Consolidate agent guidance into AGENTS.md and point CLAUDE.md at it,
  matching storage-go's layout.

Assisted-by: Claude Opus 4.8 via Claude Code
Signed-off-by: Xe Iaso <xe@tigrisdata.com>
@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.

Comment thread .github/workflows/go.yml Fixed
Comment thread .github/workflows/lint-pr-titles.yaml Dismissed
They're hanging infinitely.

Signed-off-by: Xe Iaso <xe@tigrisdata.com>
Comment thread .github/workflows/go.yml Dismissed
@Xe Xe merged commit 4fd6e5f into main Jun 2, 2026
8 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.

4 participants