Skip to content

Commit

Permalink
feat(go): add testing deps to images (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss committed Aug 9, 2021
1 parent 070b026 commit c530aac
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 19 deletions.
3 changes: 3 additions & 0 deletions go/go111/Dockerfile
Expand Up @@ -60,4 +60,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \
apt-get install google-cloud-sdk -y

# Install testing tools
RUN go get github.com/jstemmer/go-junit-report

WORKDIR $GOPATH
13 changes: 8 additions & 5 deletions go/go112/Dockerfile
Expand Up @@ -16,8 +16,8 @@ FROM golang:1.12

# Install dependencies
RUN set -ex; \
apt-get update -y; \
apt-get install -y \
apt-get update -y; \
apt-get install -y \
make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl \
Expand All @@ -28,9 +28,9 @@ RUN set -ex; \
# Install docker
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable" && \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io

Expand Down Expand Up @@ -60,4 +60,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \
apt-get install google-cloud-sdk -y

# Install test tools
RUN GO111MODULE=on go get github.com/jstemmer/go-junit-report@latest

WORKDIR $GOPATH
3 changes: 2 additions & 1 deletion go/go113/Dockerfile
Expand Up @@ -31,6 +31,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c
apt-get install google-cloud-sdk -y

# Install tools used in build
RUN GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@latest
RUN GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@latest && \
go get github.com/jstemmer/go-junit-report@latest

WORKDIR $GOPATH
3 changes: 2 additions & 1 deletion go/go114/Dockerfile
Expand Up @@ -31,6 +31,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c
apt-get install google-cloud-sdk -y

# Install tools used in build
RUN GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@latest
RUN GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@latest && \
go get github.com/jstemmer/go-junit-report@latest

WORKDIR $GOPATH
13 changes: 7 additions & 6 deletions go/go115/Dockerfile
Expand Up @@ -17,8 +17,8 @@ FROM golang:1.15

# Install dependencies
RUN set -ex; \
apt-get update -y; \
apt-get install -y \
apt-get update -y; \
apt-get install -y \
make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl \
Expand All @@ -29,9 +29,9 @@ RUN set -ex; \
# Install docker
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable" && \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io

Expand Down Expand Up @@ -62,6 +62,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c
apt-get install google-cloud-sdk -y

# Install tools used in build
RUN GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@latest
RUN GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@latest && \
go get github.com/jstemmer/go-junit-report@latest

WORKDIR $GOPATH
15 changes: 9 additions & 6 deletions go/go116/Dockerfile
Expand Up @@ -16,8 +16,8 @@ FROM golang:1.16

# Install dependencies
RUN set -ex; \
apt-get update -y; \
apt-get install -y \
apt-get update -y; \
apt-get install -y \
make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl \
Expand All @@ -28,9 +28,9 @@ RUN set -ex; \
# Install docker
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable" && \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io

Expand Down Expand Up @@ -61,6 +61,9 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c
apt-get install google-cloud-sdk -y

# Install tools used in build
RUN go install honnef.co/go/tools/cmd/staticcheck@latest
RUN go install honnef.co/go/tools/cmd/staticcheck@latest && \
go install github.com/jstemmer/go-junit-report@latest && \
go install golang.org/x/lint/golint@latest && \
go install golang.org/x/tools/cmd/goimports@latest

WORKDIR $GOPATH

0 comments on commit c530aac

Please sign in to comment.