From 76908d868bc38d1865b74694c8a8852919a36119 Mon Sep 17 00:00:00 2001 From: Elisey Zanko Date: Fri, 24 Mar 2023 12:38:14 +0500 Subject: [PATCH] Add tox --- library/tox | 6 ++++++ test/config.sh | 3 +++ test/tests/tox-basics/run.sh | 8 ++++++++ test/tests/tox-basics/test.py | 6 ++++++ test/tests/tox-basics/tox.ini | 11 +++++++++++ 5 files changed, 34 insertions(+) create mode 100644 library/tox create mode 100644 test/tests/tox-basics/run.sh create mode 100644 test/tests/tox-basics/test.py create mode 100644 test/tests/tox-basics/tox.ini diff --git a/library/tox b/library/tox new file mode 100644 index 00000000000000..e79a78203c6e5c --- /dev/null +++ b/library/tox @@ -0,0 +1,6 @@ +Maintainers: Elisey Zanko (@31z4) +GitRepo: https://github.com/31z4/tox-docker.git +Architectures: amd64, arm64v8, ppc64le, s390x + +Tags: 4-3, 4-3.0, 4-3.0.1, 4, 4.4-3, 4.4-3.0, 4.4-3.0.1, 4.4, 4.4.7-3, 4.4.7-3.0, 4.4.7-3.0.1, 4.4.7, latest +GitCommit: 881e2f195d431ca14d1da7e2e5044c3e0ff932b7 diff --git a/test/config.sh b/test/config.sh index fcdeb8cc7959ef..814f2c35537dc0 100644 --- a/test/config.sh +++ b/test/config.sh @@ -265,6 +265,9 @@ imageTests+=( [tomcat]=' tomcat-hello-world ' + [tox]=' + tox-basics + ' [varnish]=' varnish ' diff --git a/test/tests/tox-basics/run.sh b/test/tests/tox-basics/run.sh new file mode 100644 index 00000000000000..24e56d535c8c5f --- /dev/null +++ b/test/tests/tox-basics/run.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -eo pipefail + +dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" + +image="$1" + +docker run --rm --volume="$dir:/tests" "$image" diff --git a/test/tests/tox-basics/test.py b/test/tests/tox-basics/test.py new file mode 100644 index 00000000000000..803fa9eb09ddc7 --- /dev/null +++ b/test/tests/tox-basics/test.py @@ -0,0 +1,6 @@ +import unittest + + +class Test(unittest.TestCase): + def test(self): + self.assertTrue(True) diff --git a/test/tests/tox-basics/tox.ini b/test/tests/tox-basics/tox.ini new file mode 100644 index 00000000000000..64a8a31b90fe91 --- /dev/null +++ b/test/tests/tox-basics/tox.ini @@ -0,0 +1,11 @@ +[tox] +envlist = py{311,310,39,38,37},black +skipsdist = true +skip_missing_interpreters = false + +[testenv] +commands = python -m unittest test.py + +[testenv:black] +deps = black +commands = black --check test.py