mirror of
https://github.com/asciinema/asciinema.git
synced 2026-05-18 05:04:50 +02:00
Script for running integration tests on multiple distros via Docker
This commit is contained in:
17
tests/distros.sh
Executable file
17
tests/distros.sh
Executable 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
|
||||
10
tests/distros/Dockerfile.centos
Normal file
10
tests/distros/Dockerfile.centos
Normal 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
|
||||
13
tests/distros/Dockerfile.debian
Normal file
13
tests/distros/Dockerfile.debian
Normal 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
|
||||
9
tests/distros/Dockerfile.fedora
Normal file
9
tests/distros/Dockerfile.fedora
Normal 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
|
||||
13
tests/distros/Dockerfile.ubuntu
Normal file
13
tests/distros/Dockerfile.ubuntu
Normal 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
|
||||
Reference in New Issue
Block a user