Contributing
Development setup
You need Go 1.27.4 or later (see go.mod).
git clone https://github.com/arush-sal/gt7-telemetry-collector
cd gt7-telemetry-collector
go build ./...
go test ./...
go run ./cmd/gt7-collector --versionProtobuf code is generated from proto/ (see buf.yaml and buf.gen.yaml) into
gen/. The car reference tables in gt7data are generated by
gt7data/internal/gen.
Quality gates
Run these before opening a pull request. CI runs the same checks.
gofmt -l . # must print nothing
golangci-lint run # golangci-lint v2, config in .golangci.yml
go vet ./...
go test -race ./...
govulncheck ./...Exported identifiers need a doc comment that starts with their name (enforced by
the revive exported rule).
CI workflows
| Workflow | Trigger | What it does |
|---|---|---|
test.yml | push and PR to master, reusable | golangci-lint, go vet, go test -race with coverage. |
security.yml | push and PR to master, weekly, manual, reusable | Trivy filesystem scans, zizmor audit of workflows, govulncheck. |
build.yml | push to master, manual | GoReleaser snapshot build. |
release.yml | tag v* | Security and tests, then GoReleaser, then build provenance attestation. |
docs.yml | push to master changing docs/** or the workflow, manual | Hugo build, deploy to GitHub Pages (master only). |
All actions are pinned by full commit SHA.
Building the docs
Install Hugo extended v0.169.0 and Go. The Hextra theme is pinned to
v0.13.0 in the separate docs/go.mod module; root Go commands exclude it.
hugo server --source docs # live preview
hugo --gc --minify --source docs # CI build; output goes to docs/public/
hugo --printPathWarnings --source docs # check output path collisionsPull requests run only tests and security checks. Releases call both reusable
workflows with cache: false; release builds do not restore or save caches.
Releasing
Pushing a tag that matches v* runs the release workflow: it runs the security
and test workflows, then GoReleaser builds archives for linux, darwin and
windows (amd64, arm64), writes checksums.txt and SBOMs, signs every artifact
with keyless cosign, publishes the GitHub Release, and attests build provenance.
git tag -s v0.1.0 -m "v0.1.0"
git push origin v0.1.0Tags containing a pre-release suffix are published as pre-releases. The
release workflow first verifies the tag: it must match vX.Y.Z or
vX.Y.Z-rc.N and point at a commit on master history, otherwise nothing is
built or published.
License
Business Source License 1.1 (LICENSE).
| Parameter | Value in LICENSE |
|---|---|
| Change Date | 2030-01-01 |
| Change License | GNU General Public License version 3.0 (GPLv3) |
| Additional Use Grant | None. |
Non-production use is permitted now; on the Change Date the work becomes
available under GPLv3. See LICENSE for the full terms.