Upgrade Go toolchain pins and add Gitea Actions CI checks

Bump the go directive and mise tool pin to Go 1.27.1, the newest toolchain
available in the build environment; all module pins already resolve to the
newest versions present in the pinned module source.

Add scripts/check-deps.sh, which fails when go.mod pins an old module. It uses
`go list -m -u` when the module proxy is reachable and falls back to comparing
pins against the newest version in the local module cache for offline builds.
Expose it as the `mise run deps` task and document it.

Add .gitea/workflows/ci.yml, which runs on every pull request and every push to
main and invokes scripts/check.sh (gofmt, go mod verify, go vet, go build,
go test -cover). Also cover the Gitea client token/slug handling with unit
tests and document the CI workflow.

Add the mise check task so the CI checks can be run locally.
This commit is contained in:
software-maintainer committed 2026-10-28 07:51:21 +00:00
1 parent 55d4259f4a
commit 22e4c96192
7 files changed
+263 -3

No files matched your search

+9 -1
View File
@@ -1,5 +1,5 @@
[tools]
go = "1.26.1"
go = "1.27.1"
[tasks.build]
run = "go build -o bin/stamp ./cmd/stamp"
@@ -12,3 +12,11 @@ run = "golangci-lint run"
[tasks.install]
run = "go install ./cmd/stamp"
[tasks.check]
description = "Run formatting, vet, build, and tests (the same checks CI runs)"
run = "./scripts/check.sh"
[tasks.deps]
description = "Check that go.mod pins the newest available module versions"
run = "./scripts/check-deps.sh"