Repository navigation
ci: harden Go workflows — official golangci-lint action, concurrency, path filters, single coverage pass, zenoh-c cache - #91
Open
EslaM-X wants to merge 1 commit into
Conversation
…s, single coverage pass, zenoh-c cache) Replace the master install.sh supply-chain footgun with the official golangci-lint-action (pinned v2.7.2), bound every run with concurrency/timeout and least-privilege permissions, gate Go jobs on relevant paths, collapse the duplicated test+coverage pass into one profiled run with an in-log summary, and cache the pinned zenoh-c cgo prerequisite per runner+arch. - go-lint.yml: golangci/golangci-lint-action@v6 (version v2.7.2) instead of piping the project master install.sh into a shell; the Makefile stays the single source of truth for cgo env and lint flags. - go-unitest.yml: single 'make test-coverage' pass (was make test + make test-coverage), then 'go tool cover -func' prints the per-function summary; coverage artifact unchanged. - Both: push/pull_request path filters (tunnel/**, Makefile, .github/workflows/**), concurrency cancel-in-progress, timeout-minutes, permissions contents: read, workflow_dispatch, actions/cache@v4 for .zenoh-c.
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens the two Go CI workflows —
Run Go LintandRun Go Unit Tests— so every change to the shared tunnel is validated faster, safer, and exactly once.This is a pure CI/infra change: no Go, Makefile, or behavior code is touched. It mirrors the
make:/config:infra-cleanup commits already merged onmain.Motivation
Three concrete problems existed in the current workflows:
master/install.shinto a shell (curl … | sh)master; only the binary version is pinnedRun Go Unit Testsexecuted the suite twice (make testandmake test-coverage); no per-function summary was ever printed; coverage was only reachable via a downloaded artifactconcurrency,timeout-minutes,permissions, orpathsfilters; thezenoh-ccgo prerequisite was re-downloaded on every job;actions/cache@v3is deprecatedChanges
go-lint.ymlgolangci/golangci-lint-action@v6with the version pinned tov2.7.2(unchanged from before) — no moreinstall.shpiping.make lintremains the single source of truth for cgo environment and lint flags.concurrency(cancel-in-progress),timeout-minutes: 15,permissions: contents: read,workflow_dispatch.pathsfilters:tunnel/**,Makefile,.github/workflows/**.zenoh-crelease (actions/cache@v4, keyed on OS + arch) so cgo analysis starts warm.go-unitest.ymlmake test-coveragepass, thengo tool cover -funcprints the per-function coverage summary directly in the run log.concurrency/timeout/permissions/workflow_dispatch/pathshardening andzenoh-ccaching.tunnel/coverage.out).Validation
safe_load).go test -p 8 -coverprofile coverage.out ./...→ all packages okgo tool cover -func coverage.out→ per-function summary printed (total 11.9%)go vet ./...→ cleanpathsmatches.github/workflows/**), so this PR is verified by CI itself — the new definitions validate the codebase exactly as every future PR will.Notes
pathsfilters mean documentation-only PRs (README/docs) will show these checks as skipped rather than passing — expected and intended: nothing Go-related can regress.v2.7.2); only the installation mechanism changed.— EslaM-X 🇪🇬