Skip to content

ci: enforce YAML linting, proto drift detection, and pre-commit hooks#96

Open
0xmc wants to merge 1 commit into
mainfrom
feat/ci-improvements
Open

ci: enforce YAML linting, proto drift detection, and pre-commit hooks#96
0xmc wants to merge 1 commit into
mainfrom
feat/ci-improvements

Conversation

@0xmc
Copy link
Copy Markdown
Contributor

@0xmc 0xmc commented May 25, 2026

  • Add yaml-lint CI job backed by .yamllint.yaml (120-char line limit, document-start disabled for Taskfiles/GH Actions, 'on' key allowed)
  • Add proto-check CI job: regenerates .pb.go files and fails on diff, preventing committed proto drift; gated on test-e2e alongside other tier-1 jobs
  • Expand unit test coverage from ./pkg/common/util/... to ./... with -short flag so network-dependent tests are skipped in CI
  • Add .pre-commit-config.yaml: trailing-whitespace, end-of-file-fixer, merge-conflict detection, private-key detection, yamllint, gofmt, go vet, and golangci-lint
  • Add task hooks (installs pre-commit hooks) and task proto (regenerates protobuf Go code); pin all toolchain versions: golangci-lint v2.12.2, protoc 29.3, protoc-gen-go v1.36.11, protoc-gen-go-grpc v1.6.1
  • Update both devcontainers to install Python 3.13 (pre-commit runtime), run task hooks on post-create, and use pinned tool versions matching CI

- Add yaml-lint CI job backed by .yamllint.yaml (120-char line limit,
  document-start disabled for Taskfiles/GH Actions, 'on' key allowed)
- Add proto-check CI job: regenerates .pb.go files and fails on diff,
  preventing committed proto drift; gated on test-e2e alongside other
  tier-1 jobs
- Expand unit test coverage from ./pkg/common/util/... to ./... with
  -short flag so network-dependent tests are skipped in CI
- Add .pre-commit-config.yaml: trailing-whitespace, end-of-file-fixer,
  merge-conflict detection, private-key detection, yamllint, gofmt,
  go vet, and golangci-lint
- Add task hooks (installs pre-commit hooks) and task proto (regenerates
  protobuf Go code); pin all toolchain versions: golangci-lint v2.12.2,
  protoc 29.3, protoc-gen-go v1.36.11, protoc-gen-go-grpc v1.6.1
- Update both devcontainers to install Python 3.13 (pre-commit runtime),
  run task hooks on post-create, and use pinned tool versions matching CI
@0xmc 0xmc requested a review from a team as a code owner May 25, 2026 21:14
@0xmc 0xmc requested a review from savme May 25, 2026 21:14
Comment thread .github/workflows/ci.yml
cache-from: type=gha
cache-to: type=gha,mode=max

proto-check:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The proto implementation is being phased out of the code base so this is not needed going forward.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll get this pulled out

Comment thread .github/workflows/ci.yml
version: v2.12.2
args: --timeout=5m

yaml-lint:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we are going yamllint here, it makes the pre-commit check somewhat redundant. I would rather we do it in the CI pipeline and not do using the pre-commit hook. Happy to discuss if you feel strongly about using pre-commit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I generally like the idea of catching these types of things with a pre-commit hook or something I can run locally before CI catches them. Ideally it matches what CI is doing, which granted is duplicative, but I like to think of it as hygiene in depth.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed with the localization of it for sure. I have a todo item on my list to pull the execution out of the pipeline and into localized scripts so the pre-merge ci actions can be run locally. would that work address your concern?

@0xmc
Copy link
Copy Markdown
Contributor Author

0xmc commented May 26, 2026 via email

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