diff --git a/tests/distros.sh b/tests/distros.sh deleted file mode 100755 index c34d272..0000000 --- a/tests/distros.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -readonly DISTROS=( - 'arch' - 'alpine' - 'centos' - 'debian' - 'fedora' - 'ubuntu' -) - -readonly DOCKER='docker' - -# do not redefine builtin `test` -test_() { - local -r tag="${1}" - - local -ra docker_opts=( - "--tag=asciinema/asciinema:${tag}" - "--file=tests/distros/Dockerfile.${tag}" - ) - - printf "\e[1;32mTesting on %s...\e[0m\n\n" "${tag}" - - # shellcheck disable=SC2068 - "${DOCKER}" build ${docker_opts[@]} . - - "${DOCKER}" run --rm -it "asciinema/asciinema:${tag}" tests/integration.sh -} - - -for distro in "${DISTROS[@]}"; do - test_ "${distro}" -done - -printf "\n\e[1;32mAll tests passed.\e[0m\n" diff --git a/tests/distros/Dockerfile.alpine b/tests/distros/Dockerfile.alpine deleted file mode 100644 index 9716325..0000000 --- a/tests/distros/Dockerfile.alpine +++ /dev/null @@ -1,19 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -FROM docker.io/library/alpine:3.15 - -# https://github.com/actions/runner/issues/241 -RUN apk --no-cache add bash ca-certificates make python3 util-linux - -WORKDIR /usr/src/app - -COPY asciinema/ asciinema/ -COPY tests/ tests/ - -ENV LANG="en_US.utf8" - -USER nobody - -ENTRYPOINT ["/bin/bash"] - -# vim:ft=dockerfile diff --git a/tests/distros/Dockerfile.arch b/tests/distros/Dockerfile.arch deleted file mode 100644 index 3224495..0000000 --- a/tests/distros/Dockerfile.arch +++ /dev/null @@ -1,22 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -FROM docker.io/library/archlinux:latest - -RUN pacman-key --init \ - && pacman --sync --refresh --sysupgrade --noconfirm make python3 \ - && printf "LANG=en_US.UTF-8\n" > /etc/locale.conf \ - && locale-gen \ - && pacman --sync --clean --clean --noconfirm - -WORKDIR /usr/src/app - -COPY asciinema/ asciinema/ -COPY tests/ tests/ - -ENV LANG="en_US.utf8" - -USER nobody - -ENTRYPOINT ["/bin/bash"] - -# vim:ft=dockerfile diff --git a/tests/distros/Dockerfile.centos b/tests/distros/Dockerfile.centos deleted file mode 100644 index bc4fd7e..0000000 --- a/tests/distros/Dockerfile.centos +++ /dev/null @@ -1,18 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -FROM docker.io/library/centos:7 - -RUN yum install -y epel-release && yum install -y make python36 && yum clean all - -WORKDIR /usr/src/app - -COPY asciinema/ asciinema/ -COPY tests/ tests/ - -ENV LANG="en_US.utf8" - -USER nobody - -ENTRYPOINT ["/bin/bash"] - -# vim:ft=dockerfile diff --git a/tests/distros/Dockerfile.debian b/tests/distros/Dockerfile.debian deleted file mode 100644 index 6c14287..0000000 --- a/tests/distros/Dockerfile.debian +++ /dev/null @@ -1,33 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -FROM docker.io/library/debian:bullseye - -ENV DEBIAN_FRONTENT="noninteractive" - -RUN apt-get update \ - && apt-get install -y \ - ca-certificates \ - locales \ - make \ - procps \ - python3 \ - && localedef \ - -i en_US \ - -c \ - -f UTF-8 \ - -A /usr/share/locale/locale.alias \ - en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /usr/src/app - -COPY asciinema/ asciinema/ -COPY tests/ tests/ - -ENV LANG="en_US.utf8" - -USER nobody - -ENV SHELL="/bin/bash" - -# vim:ft=dockerfile diff --git a/tests/distros/Dockerfile.fedora b/tests/distros/Dockerfile.fedora deleted file mode 100644 index e5abb51..0000000 --- a/tests/distros/Dockerfile.fedora +++ /dev/null @@ -1,20 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -# https://medium.com/nttlabs/ubuntu-21-10-and-fedora-35-do-not-work-on-docker-20-10-9-1cd439d9921 -# https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg5971024.html -FROM registry.fedoraproject.org/fedora:34 - -RUN dnf install -y make python3 procps && dnf clean all - -WORKDIR /usr/src/app - -COPY asciinema/ asciinema/ -COPY tests/ tests/ - -ENV LANG="en_US.utf8" -ENV SHELL="/bin/bash" - -USER nobody - -ENTRYPOINT ["/bin/bash"] -# vim:ft=dockerfile diff --git a/tests/distros/Dockerfile.ubuntu b/tests/distros/Dockerfile.ubuntu deleted file mode 100644 index 38223c2..0000000 --- a/tests/distros/Dockerfile.ubuntu +++ /dev/null @@ -1,32 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -FROM docker.io/library/ubuntu:20.04 - -ENV DEBIAN_FRONTENT="noninteractive" - -RUN apt-get update \ - && apt-get install -y \ - ca-certificates \ - locales \ - make \ - python3 \ - && localedef \ - -i en_US \ - -c \ - -f UTF-8 \ - -A /usr/share/locale/locale.alias \ - en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /usr/src/app - -COPY asciinema/ asciinema/ -COPY tests/ tests/ - -ENV LANG="en_US.utf8" - -USER nobody - -ENTRYPOINT ["/bin/bash"] - -# vim:ft=dockerfile