Run tests inside container build
This commit is contained in:
1 parent
3500561af7
commit
1c54ce1d92
2 files changed
+1
-3
No files matched your search
@@ -17,9 +17,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Test server
|
||||
run: docker run --rm -v "$PWD/server:/src" -w /src golang:1.25-alpine go test ./...
|
||||
|
||||
- name: Log in to Gitea registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
|
||||
@@ -10,6 +10,7 @@ WORKDIR /src/server
|
||||
COPY server/go.mod server/go.sum ./
|
||||
RUN go mod download
|
||||
COPY server/ ./
|
||||
RUN go test ./...
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/box-manifest-server ./cmd/box-manifest-server
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
Reference in new issue
Block a user