From bf6c04e4cc6438dea33a18a1c8bbdfce3876b86f Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Wed, 28 Jul 2021 11:50:08 +0200 Subject: Update docker tests --- .github/docker/Dockerfile-backend | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/docker/Dockerfile-backend (limited to '.github/docker/Dockerfile-backend') diff --git a/.github/docker/Dockerfile-backend b/.github/docker/Dockerfile-backend new file mode 100644 index 0000000..06036e4 --- /dev/null +++ b/.github/docker/Dockerfile-backend @@ -0,0 +1,18 @@ +FROM golang:1.16 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq \ + git \ + pkg-config \ + libpcap-dev \ + libhyperscan-dev + +WORKDIR /caronte + +COPY . ./ + +RUN export VERSION=$(git describe --tags --abbrev=0) && \ + go mod download && \ + go build -ldflags "-X main.Version=$VERSION" + +ENTRYPOINT go test -v -race -covermode=atomic -- cgit v1.2.3-70-g09d2 From 489ae5c7c65e7f60c3a0e5dc86b1e669e7bf67b5 Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Wed, 28 Jul 2021 13:00:36 +0200 Subject: Update test backend dockerfile --- .github/docker/Dockerfile-backend | 5 ++--- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to '.github/docker/Dockerfile-backend') diff --git a/.github/docker/Dockerfile-backend b/.github/docker/Dockerfile-backend index 06036e4..82ed29f 100644 --- a/.github/docker/Dockerfile-backend +++ b/.github/docker/Dockerfile-backend @@ -11,8 +11,7 @@ WORKDIR /caronte COPY . ./ -RUN export VERSION=$(git describe --tags --abbrev=0) && \ - go mod download && \ - go build -ldflags "-X main.Version=$VERSION" +RUN go mod download && \ + go build ENTRYPOINT go test -v -race -covermode=atomic diff --git a/Dockerfile b/Dockerfile index 4fb71a3..0573a6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ WORKDIR /caronte-frontend COPY ./frontend ./ -RUN yarnpkg install && yarnpkg build --production=true +RUN yarn install && yarn build --production=true # LAST STAGE -- cgit v1.2.3-70-g09d2