ci: move go test into Dockerfile build stage
Build flock Image / build (push) Has been cancelled

The runner runs jobs via act + DinD; `docker run -v "$PWD:/src"` from
inside the job container mounts the runner-job filesystem, not the
docker daemon's host fs, so the mount appears empty and `go test ./...`
fails with "directory prefix . does not contain main module".

Run tests in the same container that builds — same workspace, no mount.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Donavan Fritz
2026-04-24 21:19:10 -05:00
parent 20f47916af
commit e0ae98ad6c
2 changed files with 4 additions and 5 deletions
-5
View File
@@ -9,11 +9,6 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4
- name: Run unit tests
run: |
docker run --rm -v "$PWD:/src" -w /src golang:1.26-alpine \
sh -c "go test ./..."
- name: Log in to Gitea registry
uses: docker/login-action@v3
with: