-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathDockerfile.test
More file actions
27 lines (21 loc) · 965 Bytes
/
Dockerfile.test
File metadata and controls
27 lines (21 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM golang:1.24.10
WORKDIR /build
ARG JUST_VERSION=1.46.0
RUN set -eux; \
arch="$(uname -m)"; \
case "$arch" in \
x86_64|amd64) target="x86_64-unknown-linux-musl" ;; \
aarch64|arm64) target="aarch64-unknown-linux-musl" ;; \
*) echo "Unsupported arch for just: $arch" ; exit 1 ;; \
esac; \
curl -sSfL "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${target}.tar.gz" \
| tar -xz -C /usr/local/bin just; \
chmod +x /usr/local/bin/just; \
just --version
COPY scripts/install.sh .
RUN chmod +x install.sh && ./install.sh && go install github.com/a-h/templ/cmd/templ@v0.3.856
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
COPY go.mod go.sum ./
RUN go mod download
COPY . .
CMD ["sh", "-c", "go vet -tags dev ./... && golangci-lint run --build-tags dev ./... && go test -tags dev -v ./..."]