Add podman local test runner

modern_python
jaseg 2022-06-21 11:02:07 +02:00
rodzic 95d0b60490
commit 3aeea67f37
6 zmienionych plików z 52 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,6 @@
FROM docker.io/archlinux:latest
MAINTAINER gerbolyze@jaseg.de
RUN pacman --noconfirm -Syu
RUN pacman --noconfirm -Sy git python python-pip base-devel python-numpy python-slugify python-lxml python-click python-pillow librsvg python-scipy python-sphinx python-pytest twine python-beautifulsoup4 gerbv

Wyświetl plik

@ -0,0 +1,11 @@
FROM docker.io/debian:latest
MAINTAINER gerbolyze@jaseg.de
RUN env DEBIAN_FRONTEND=noninteractive apt update -y
RUN env DEBIAN_FRONTEND=noninteractive apt install -y libopencv-dev libpugixml-dev libpangocairo-1.0-0 libpango1.0-dev libcairo2-dev clang make python3 git python3-wheel curl python3-pip python3-venv
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN sh -c '. ~/.cargo/env && rustup install stable'
RUN sh -c '. ~/.cargo/env && rustup default stable'
RUN sh -c '. ~/.cargo/env && cargo install usvg'

Wyświetl plik

@ -0,0 +1,7 @@
FROM docker.io/fedora:latest
MAINTAINER gerbolyze@jaseg.de
RUN dnf update --refresh -y
RUN dnf install -y python3 make clang opencv-devel pugixml-devel pango-devel cairo-devel rust cargo
RUN cargo install usvg

8
podman/testdata/testscript.sh vendored 100755
Wyświetl plik

@ -0,0 +1,8 @@
#!/bin/sh
set -e
git clone /data/git git
cd git
python3 -m pip install pytest-parallel
python3 -m pytest --workers auto

Wyświetl plik

@ -0,0 +1,6 @@
FROM docker.io/ubuntu:latest
MAINTAINER gerbolyze@jaseg.de
RUN env DEBIAN_FRONTEND=noninteractive apt update -y
RUN env DEBIAN_FRONTEND=noninteractive apt install -y python3 git python3-wheel curl python3-pip python3-venv
RUN python3 -m pip install numpy slugify lxml click pillow scipy sphinx pytest beautifulsoup4

14
run-tests.sh 100755
Wyświetl plik

@ -0,0 +1,14 @@
#!/bin/sh
set -e
rm -rf podman/testdata/git
git clone --depth 1 . podman/testdata/git
for distro in arch ubuntu
do
podman build -t gerbonara-$distro-testenv -f podman/$distro-testenv
mkdir -p /tmp/gerbonara-test-out
podman run --mount type=bind,src=podman/testdata,dst=/data,ro --mount type=bind,src=/tmp/gerbonara-test-out,dst=/out gerbonara-$distro-testenv /data/testscript.sh
done