Make the CI gate work on Gitea by building instead of bind-mounting
Tests / vet + fmt + tests (pull_request) Successful in 27s
Tests / vet + fmt + tests (push) Successful in 6s

This commit was merged in pull request #1.
This commit is contained in:
2026-09-01 20:33:04 +02:00
parent 05dc042e49
commit d44c941a92
5 changed files with 26 additions and 25 deletions
+3 -10
View File
@@ -1,10 +1,12 @@
# Docker-based dev workflow — no local tooling beyond Docker is required.
#
# docker compose run --rm test
# docker compose run --rm ci
# docker compose run --rm vet
# docker compose run --rm build
#
# The full gate — vet, formatting and tests — is `docker build .`, which is what
# CI runs.
#
# Build caches persist in the `gocache` volume, so re-runs are fast and the
# host tree stays clean. Commands that rewrite source (fmt, tidy) keep your
# ownership when run with `--user "$(id -u):$(id -g)"`.
@@ -52,15 +54,6 @@ services:
<<: *go
command: go mod tidy
# vet + format check + tests, in one container.
ci:
<<: *go
command: >
sh -c 'go vet ./... &&
{ unformatted=$$(gofmt -l .); test -z "$$unformatted" ||
{ echo "unformatted files:"; echo "$$unformatted"; exit 1; }; } &&
go test ./...'
# Interactive shell for ad-hoc work: docker compose run --rm dev
dev:
<<: *go