Script for running integration tests on multiple distros via Docker

This commit is contained in:
Marcin Kulik
2017-12-02 18:40:09 +01:00
parent 418ee5a8a5
commit 7418b7240d
5 changed files with 62 additions and 0 deletions

17
tests/distros.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -e
path_to_self="${BASH_SOURCE[0]}"
tests_dir="$(cd "$(dirname "$path_to_self")" && pwd)"
test() {
printf "\e[1;32mTesting on $1...\e[0m\n"
docker build -t asciinema/asciinema:$1 -f tests/distros/Dockerfile.$1 .
docker run --rm -ti asciinema/asciinema:$1 tests/integration.sh
}
test ubuntu
test debian
test fedora
test centos

View File

@@ -0,0 +1,10 @@
FROM centos:7
RUN yum install -y epel-release
RUN yum install -y python34
WORKDIR /usr/src/app
COPY asciinema asciinema
COPY tests tests
ENV LANG en_US.utf8
ENV SHELL /bin/bash
ENV USER docker

View File

@@ -0,0 +1,13 @@
FROM debian:jessie
RUN apt-get update && apt-get install -y \
ca-certificates \
locales \
python3
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
WORKDIR /usr/src/app
COPY asciinema asciinema
COPY tests tests
ENV LANG en_US.utf8
ENV SHELL /bin/bash
ENV USER docker

View File

@@ -0,0 +1,9 @@
FROM fedora:26
RUN dnf install -y python3 procps
WORKDIR /usr/src/app
COPY asciinema asciinema
COPY tests tests
ENV LANG en_US.utf8
ENV SHELL /bin/bash
ENV USER docker

View File

@@ -0,0 +1,13 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
ca-certificates \
locales \
python3
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
WORKDIR /usr/src/app
COPY asciinema asciinema
COPY tests tests
ENV LANG en_US.utf8
ENV SHELL /bin/bash
ENV USER docker