Skip to content

Commit 1142f77

Browse files
committed
Use Debian for running unit tests
Signed-off-by: Stefan Prodan <[email protected]>
1 parent b28f23a commit 1142f77

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/actions/run-tests/Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
FROM golang:1.16-alpine
1+
FROM golang:1.16-buster as builder
22

3-
# Add any build or testing essential system packages
4-
RUN apk add --no-cache build-base git pkgconf
5-
RUN apk add --no-cache libgit2-dev~=1.1
6-
RUN apk add --no-cache curl
3+
# Up-to-date libgit2 dependencies are only available in sid (unstable).
4+
RUN echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list \
5+
&& echo "deb-src http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list
6+
RUN set -eux; \
7+
apt-get update \
8+
&& apt-get install -y libgit2-dev/unstable zlib1g-dev/unstable libssh2-1-dev/unstable libpcre3-dev/unstable \
9+
&& apt-get clean \
10+
&& apt-get autoremove --purge -y \
11+
&& rm -rf /var/lib/apt/lists/*
712

8-
# Use the GitHub Actions uid:gid combination for proper fs permissions
9-
RUN addgroup -g 116 -S test && adduser -u 1001 -S -g test test
13+
RUN groupadd -g 116 test && \
14+
useradd -u 1001 --gid test --shell /bin/sh --create-home test
1015

1116
# Run as test user
1217
USER test

0 commit comments

Comments
 (0)