VERSION 0.8

deps:
    FROM golang:1.21-alpine3.18
    WORKDIR /libs/hello
    COPY go.mod go.sum ./
    RUN go mod download

artifact:
    FROM +deps
    COPY hello.go .
    SAVE ARTIFACT .

unit-test:
    FROM +artifact
    COPY hello_test.go .
    RUN go test
