Skip to content

Commit

Permalink
Update test zoo
Browse files Browse the repository at this point in the history
- Unify test setup in Docker files
- Add Fedora 38 Docker image
- Add OpenSUSE Leap Docker image
- Add OpenSUSE Tumbleweed Docker image
- Drop Fedora 36 Docker image
- Drop OpenSUSE 15 Docker image

Signed-off-by: Thomas Lauf <[email protected]>
  • Loading branch information
lauft committed Dec 24, 2023
1 parent 05ccf7b commit 32839ce
Show file tree
Hide file tree
Showing 17 changed files with 107 additions and 54 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ jobs:
- name: "Debian Testing"
runner: ubuntu-latest
container: debiantesting
- name: "Fedora 36"
runner: ubuntu-latest
container: fedora36
- name: "Fedora 37"
runner: ubuntu-latest
container: fedora37
- name: "OpenSUSE 15.0"
- name: "Fedora 38"
runner: ubuntu-latest
container: fedora38
- name: "OpenSUSE Leap"
runner: ubuntu-latest
container: opensuseleap
- name: "OpenSUSE Tumbleweed"
runner: ubuntu-latest
container: opensuse1500
container: opensusetumbleweed
- name: "Ubuntu 18.04"
runner: ubuntu-latest
container: ubuntu1804
Expand Down
52 changes: 30 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,90 +16,98 @@ services:
security_opt:
- label=type:container_runtime_t
tty: true
test-fedora36:
test-archlinux:
build:
context: .
dockerfile: test/docker/fedora36
dockerfile: test/docker/archlinux
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-fedora37:
test-centos7:
build:
context: .
dockerfile: test/docker/fedora37
dockerfile: test/docker/centos7
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-centos7:
test-centos8:
build:
context: .
dockerfile: test/docker/centos7
dockerfile: test/docker/centos8
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-centos8:
test-debianstable:
build:
context: .
dockerfile: test/docker/centos8
dockerfile: test/docker/debianstable
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-ubuntu1804:
test-debiantesting:
build:
context: .
dockerfile: test/docker/ubuntu1804
dockerfile: test/docker/debiantesting
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-ubuntu2004:
test-fedora37:
build:
context: .
dockerfile: test/docker/ubuntu2004
dockerfile: test/docker/fedora37
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-ubuntu2204:
test-fedora38:
build:
context: .
dockerfile: test/docker/ubuntu2204
dockerfile: test/docker/fedora38
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-debianstable:
test-opensuseleap:
build:
context: .
dockerfile: test/docker/debianstable
dockerfile: test/docker/opensuseleap
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-debiantesting:
test-opensusetumbleweed:
build:
context: .
dockerfile: test/docker/debiantesting
dockerfile: test/docker/opensusetumbleweed
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-opensuse1500:
test-ubuntu1804:
build:
context: .
dockerfile: test/docker/opensuse1500
dockerfile: test/docker/ubuntu1804
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-archlinux:
test-ubuntu2004:
build:
context: .
dockerfile: test/docker/archlinux
dockerfile: test/docker/ubuntu2004
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-ubuntu2204:
build:
context: .
dockerfile: test/docker/ubuntu2204
network_mode: "host"
security_opt:
- label=type:container_runtime_t
Expand Down
5 changes: 3 additions & 2 deletions test/docker/alpine-edge
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make -j2 test || true
WORKDIR /root/code/test/
CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version; exit $FAILED"]
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
5 changes: 3 additions & 2 deletions test/docker/alpine-latest
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make -j2 test || true
WORKDIR /root/code/test/
CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version; exit $FAILED"]
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
5 changes: 3 additions & 2 deletions test/docker/archlinux
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make -j2 test || true
WORKDIR /root/code/test/
CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version; exit $FAILED"]
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
4 changes: 2 additions & 2 deletions test/docker/centos7
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make test -j2 || true
WORKDIR /root/code/test/
RUN make -j2

CMD ["bash", "-c", "cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
4 changes: 2 additions & 2 deletions test/docker/centos8
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make test -j2 || true
WORKDIR /root/code/test/
RUN make -j2

CMD ["bash", "-c", "cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
2 changes: 1 addition & 1 deletion test/docker/debianstable
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ RUN make install

# Setup tests
WORKDIR /root/code/test/
RUN make
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
2 changes: 1 addition & 1 deletion test/docker/debiantesting
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ RUN make install

# Setup tests
WORKDIR /root/code/test/
RUN make
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
5 changes: 3 additions & 2 deletions test/docker/fedora37
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make -j2 test || true
WORKDIR /root/code/test/
CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version"]
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
7 changes: 4 additions & 3 deletions test/docker/fedora36 → test/docker/fedora38
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:36
FROM fedora:38

RUN dnf update -y
RUN dnf install -y \
Expand Down Expand Up @@ -28,6 +28,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make -j2 test || true
WORKDIR /root/code/test/
CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version"]
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
7 changes: 4 additions & 3 deletions test/docker/gentoo
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN make -j2
RUN make install

# Setup tests
RUN make -j2 test || true
WORKDIR /root/code/test
CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version; exit $FAILED"]
WORKDIR /root/code/test/
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
8 changes: 4 additions & 4 deletions test/docker/opensuse1500 → test/docker/opensuseleap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM opensuse/leap:15
FROM opensuse/leap

RUN zypper install -y \
cmake \
Expand All @@ -8,7 +8,7 @@ RUN zypper install -y \
make \
man \
python3 \
python3-dateutil \
python3-python-dateutil \
ruby

RUN gem install asciidoctor -v 2.0.15
Expand All @@ -33,6 +33,6 @@ RUN make install

# Setup tests
WORKDIR /root/code/test/
RUN make
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version; exit $FAILED"]
CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
36 changes: 36 additions & 0 deletions test/docker/opensusetumbleweed
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM opensuse/tumbleweed

RUN zypper install -y \
cmake \
gcc-c++ \
git \
man \
python3 \
python3-python-dateutil \
ruby

RUN gem install asciidoctor -v 2.0.15
RUN update-alternatives --install /usr/bin/asciidoctor asciidoctor /usr/bin/asciidoctor.ruby3.2 10
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
ENV TZ=Europe/Berlin

# Setup environment
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Setup timewarrior
ADD . /root/code/
WORKDIR /root/code/
RUN git clean -dfx
RUN git submodule init
RUN git submodule update
RUN cmake -DCMAKE_BUILD_TYPE=debug .
RUN make -j2
RUN make install

# Setup tests
WORKDIR /root/code/test/
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
2 changes: 1 addition & 1 deletion test/docker/ubuntu1804
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ RUN make install

# Setup tests
WORKDIR /root/code/test/
RUN make
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
2 changes: 1 addition & 1 deletion test/docker/ubuntu2004
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ RUN make install

# Setup tests
WORKDIR /root/code/test/
RUN make
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]
2 changes: 1 addition & 1 deletion test/docker/ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ RUN make install

# Setup tests
WORKDIR /root/code/test/
RUN make
RUN make -j2

CMD ["bash", "-c", "./run_all -v ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version ; exit $FAILED"]

0 comments on commit 32839ce

Please sign in to comment.