Make the CI gate work on Gitea by building instead of bind-mounting
This commit was merged in pull request #1.
This commit is contained in:
+3
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user