1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 07:13:53 -05:00

add bats test under docker

This commit is contained in:
rockandska
2025-09-08 15:39:35 +02:00
committed by Tester
parent 92a28e531b
commit a7897ca0f6
3 changed files with 116 additions and 8 deletions

25
test/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
ARG BASH
FROM alpine/git:v2.30.0 as bats
ARG BATS_VERSION
RUN git clone https://github.com/bats-core/bats-core.git /root/bats-core \
&& cd /root/bats-core \
&& git checkout "${BATS_VERSION}"
FROM bash:$BASH
# Gnu tools
RUN if [[ "${GNU:-}" == True ]];then \
apk add sed coreutils findutils \
;fi
# Bats
RUN apk add --update parallel ncurses git \
&& mkdir -p ~/.parallel \
&& touch ~/.parallel/will-cite
COPY --from=bats /root/bats-core /root/bats-core
RUN /root/bats-core/install.sh "/usr/local"
# Clean
RUN rm -rf /var/cache/apk/*
# Setup
RUN echo 'source /etc/profile' >> ~/.bashrc
WORKDIR /code/
CMD ["bash"]