Make your first change¶
This walks a clean checkout of Protem through the checks a real change has to pass, ending with the same commands continuous integration runs.
Clone and run the tests¶
make test first runs manifests, generate, fmt and vet, then downloads the envtest Kubernetes binaries for the version in go.mod and runs go test ./internal/... -v -coverprofile cover.out. Expect it to end with PASS and a per-package summary; the controller and API packages run real envtest suites, so this takes longer than a unit test run.
Run the linter¶
This downloads golangci-lint (pinned to the version in the Makefile) if it is not already present, then runs it over the module. A clean run prints no issues and exits 0.
Check the web UI¶
Each step should finish without errors: the type-check reports no type errors, bun test src runs the UI's test suite, and bun run build produces a production build.
Regenerate generated files¶
Several files in the repository are generated from source: CRD manifests and RBAC from kubebuilder markers, TypeScript types from internal/api/views.go, the Helm chart's CRDs and ClusterRole from config/, and the reference documentation from the CRDs and chart values. After changing any of their sources, regenerate all of them from the repository root:
Commit whatever these produce alongside your change. CI fails a pull request whose generated files are out of date rather than regenerating them for you.
What CI checks¶
Every push and pull request runs four jobs (.github/workflows/test.yml) plus a separate lint job (.github/workflows/lint.yml):
- Go — runs
make test, then runsmake manifests generate generate-tsagain and fails if that changes anything underapi,config/crd,config/rbacorweb/src/generated. - Web UI — installs with
bun install --frozen-lockfile, then runsbunx tsc --noEmit,bun test srcandbun run build. - Helm chart — runs
make manifests helm-syncand fails if that changes anything underdeploy/helm, then runsmake helm-lint. - Container images — builds the operator image and the agent image (the
enforcerbuild target) with Docker Buildx, without pushing either. - golangci-lint — the separate workflow that runs the same linter as
make lint.
A change that passes every command above locally passes CI for the same reason: these are the commands CI itself runs.