Skip to content

Commit

Permalink
Fix earthfile to tidy before testing
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
(cherry picked from commit c6500f3)
  • Loading branch information
Itxaka committed May 9, 2024
1 parent 0ef6aee commit 09359d6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ go-deps:
FROM golang:$GO_VERSION
RUN apt-get update && apt-get install -y rsync gcc bash git
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod tidy
COPY . .
RUN go mod tidy --compat=1.19
RUN go mod download
RUN go mod verify
SAVE ARTIFACT go.mod AS LOCAL go.mod
SAVE ARTIFACT go.sum AS LOCAL go.sum

test:
FROM +go-deps
WORKDIR /build
COPY . .
ARG TEST_PATHS=./...
ARG LABEL_FILTER=
ENV CGO_ENABLED=1
Expand All @@ -31,7 +28,6 @@ test:

version:
FROM +go-deps
COPY . ./
RUN --no-cache echo $(git describe --always --tags --dirty) > VERSION
RUN --no-cache echo $(git describe --always --dirty) > COMMIT
ARG VERSION=$(cat VERSION)
Expand All @@ -41,7 +37,6 @@ version:

build-kairos-agent:
FROM +go-deps
COPY . .
COPY +webui-deps/node_modules ./internal/webui/public/node_modules
COPY github.com/kairos-io/kairos-docs:main+docs/public ./internal/webui/public/local
COPY +version/VERSION ./
Expand All @@ -62,8 +57,7 @@ golint:
ARG GOLINT_VERSION
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v$GOLINT_VERSION
WORKDIR /build
COPY . .
RUN golangci-lint run
RUN bin/golangci-lint run

webui-deps:
FROM node:19-alpine
Expand Down

0 comments on commit 09359d6

Please sign in to comment.