-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run tests on multiple Bash and Git versions
Now Elegant Git is tested on 2 Git and 3 Bash versions (6 environments in total). All testing happens within Docker containers that work in parallel. The overall workflow is the following: 1. `workflows` runs a given command 2. the command starts a needed number of containers in parallel, waits until they are exited, and reports the status Such a running scheme allows to run more tests and total duration is equal to the duration of the longest test execution. From the technical side, the worker containers don't package the appropriate workflows scripts, they just configure them by default. This allows making script changes without rebuilding the images. Also, as usual, all workers bind the source files in the container's volume and use them for the execution.
- Loading branch information
Showing
6 changed files
with
221 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,60 @@ | ||
ARG bashversion=3.2.57 | ||
FROM alpine:3.12.0 as git | ||
RUN apk add --no-cache \ | ||
zlib-dev \ | ||
openssl-dev \ | ||
curl-dev \ | ||
curl \ | ||
expat-dev \ | ||
perl-dev \ | ||
python3-dev \ | ||
pcre2-dev \ | ||
asciidoc \ | ||
xmlto \ | ||
perl-error \ | ||
tcl \ | ||
tk \ | ||
make \ | ||
gcc \ | ||
g++ | ||
WORKDIR /src | ||
ARG gitversion=2.26.2 | ||
RUN curl --output git-${gitversion}.tar.gz \ | ||
https://mirrors.edge.kernel.org/pub/software/scm/git/git-${gitversion}.tar.gz && \ | ||
tar -xvzf git-${gitversion}.tar.gz | ||
RUN export TO=/git && \ | ||
mkdir -p ${TO} && \ | ||
cd git-${gitversion} && \ | ||
make prefix=/usr DESTDIR=${TO} NO_GETTEXT=YesPlease NO_REGEX=YesPlease ICONV_OMITS_BOM=Yes && \ | ||
make prefix=/usr DESTDIR=${TO} NO_GETTEXT=YesPlease NO_REGEX=YesPlease ICONV_OMITS_BOM=Yes strip && \ | ||
make prefix=/usr DESTDIR=${TO} NO_GETTEXT=YesPlease NO_REGEX=YesPlease ICONV_OMITS_BOM=Yes install && \ | ||
# remove files that aren't part of standard package | ||
rm /git/usr/libexec/git-core/git-cvs* && \ | ||
rm /git/usr/libexec/git-core/git-daemon && \ | ||
rm /git/usr/libexec/git-core/git-fast-import && \ | ||
rm /git/usr/libexec/git-core/git-http-backend && \ | ||
rm /git/usr/libexec/git-core/git-instaweb && \ | ||
rm /git/usr/libexec/git-core/git-remote-testsvn && \ | ||
rm /git/usr/libexec/git-core/git-shell && \ | ||
rm /git/usr/libexec/git-core/git-svn && \ | ||
rm /git/usr/libexec/git-core/*p4* && \ | ||
rm /git/usr/libexec/git-core/mergetools/*p4* && \ | ||
rm /git/usr/libexec/git-core/*email* && \ | ||
rm /git/usr/libexec/git-core/*imap* | ||
|
||
FROM bash:${bashversion} | ||
ARG batsversion=v1.2.0 | ||
LABEL maintainer="Dmytro Serdiuk <[email protected]>" \ | ||
description="The image serves the environment for the testing of Elegant Git." | ||
VOLUME /elegant-git | ||
description="The image serves the environment for the testing of Elegant Git." \ | ||
bashversion=${bashversion} \ | ||
gitversion=${gitversion} \ | ||
batsversion=${batsversion} | ||
WORKDIR /elegant-git | ||
VOLUME /elegant-git | ||
ENV EG_ENABLE_TESTING true | ||
ARG gitversion=2.26.2 | ||
RUN apk add --no-cache git~=${gitversion} | ||
ARG batsversion=v1.2.0 | ||
RUN git clone --branch ${batsversion} --single-branch --depth 1 https://github.com/bats-core/bats-core.git; \ | ||
COPY --from=git /git/usr/ /usr/ | ||
RUN apk add --no-cache curl-dev && \ | ||
git clone --branch ${batsversion} --single-branch --depth 1 https://github.com/bats-core/bats-core.git && \ | ||
cd bats-core && ./install.sh /usr/local && cd - && rm -r bats-core | ||
COPY bats-workflows.bash /bats-workflows.bash | ||
ENTRYPOINT [ "/bats-workflows.bash" ] | ||
ENTRYPOINT [ ".workflows/bats/bats-workflows.bash" ] | ||
CMD ["help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
ARG pythonversion=3.8.3 | ||
FROM python:${pythonversion}-alpine | ||
FROM python:3.8.3-alpine | ||
LABEL maintainer="Dmytro Serdiuk <[email protected]>" \ | ||
description="The image serves the environment for docs development of Elegant Git." | ||
ARG bashversion=5.0.17 | ||
ARG gitversion=2.26.2 | ||
RUN apk add --no-cache bash=~${bashversion} git=~${gitversion} | ||
VOLUME /elegant-git | ||
WORKDIR /elegant-git | ||
ENV EG_ENABLE_TESTING true | ||
EXPOSE 80 | ||
ENTRYPOINT [ "/docs-workflows.bash" ] | ||
ENTRYPOINT [ ".workflows/docs/docs-workflows.bash" ] | ||
CMD ["help"] | ||
COPY docs/requirements.txt . | ||
RUN python -m pip install --upgrade pip && \ | ||
python -m pip install -r requirements.txt | ||
ARG bashversion=5.0.17 | ||
RUN apk add --no-cache bash~=${bashversion} | ||
COPY .workflows/docs/docs-workflows.bash / | ||
RUN python -m pip install --no-cache-dir --upgrade pip && \ | ||
python -m pip install --no-cache-dir -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.