Skip to content

Commit 7fbcf61

Browse files
committed
Add tox
1 parent f569dd2 commit 7fbcf61

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed

library/tox

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Maintainers: Elisey Zanko <[email protected]> (@31z4)
2+
GitRepo: https://github.com/31z4/tox-docker.git
3+
GitFetch: refs/heads/main
4+
Architectures: amd64, arm64v8, ppc64le, s390x
5+
6+
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
7+
GitCommit: 881e2f195d431ca14d1da7e2e5044c3e0ff932b7

test/config.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ imageTests+=(
265265
[tomcat]='
266266
tomcat-hello-world
267267
'
268+
[tox]='
269+
tox-basics
270+
'
268271
[varnish]='
269272
varnish
270273
'

test/tests/tox-basics/run.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
set -eo pipefail
6+
7+
dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
8+
9+
image="$1"
10+
11+
newImage="$("$dir/../image-name.sh" librarytest/tox-basics "$image")"
12+
"$dir/../docker-build.sh" "$dir" "$newImage" <<EOD
13+
FROM $image
14+
COPY dir/test.py dir/tox.ini ./
15+
EOD
16+
17+
docker run --rm "$newImage"

test/tests/tox-basics/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import unittest
2+
3+
4+
class Test(unittest.TestCase):
5+
def test(self):
6+
self.assertTrue(True)

test/tests/tox-basics/tox.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tox]
2+
envlist = py{311,310,39,38,37},black
3+
skipsdist = true
4+
skip_missing_interpreters = false
5+
6+
[testenv]
7+
commands = python -m unittest test.py
8+
9+
[testenv:black]
10+
deps = black
11+
commands = black --check test.py

0 commit comments

Comments
 (0)