Skip to content

Commit 5e53d31

Browse files
committed
dockerize tests
1 parent 114c4a4 commit 5e53d31

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

tests/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG PYTHON_VERSION=3.12
2+
FROM python:${PYTHON_VERSION}
3+
4+
WORKDIR /src
5+
RUN pip install tox>=4.23
6+
7+
COPY src/pyper src/pyper
8+
COPY tests tests
9+
COPY pyproject.toml .
10+
COPY tox.ini .
11+
COPY .coveragerc .
12+
COPY .git .git
13+
14+
RUN chmod +x tests/entrypoint.sh
15+
16+
ENTRYPOINT ["tests/entrypoint.sh"]

tests/docker-compose.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: "3.8"
2+
3+
services:
4+
python3.13:
5+
container_name: test3.13
6+
build:
7+
context: ..
8+
dockerfile: tests/Dockerfile
9+
args:
10+
PYTHON_VERSION: "3.13"
11+
12+
python3.12:
13+
container_name: test3.12
14+
build:
15+
context: ..
16+
dockerfile: tests/Dockerfile
17+
args:
18+
PYTHON_VERSION: "3.12"
19+
20+
python3.11:
21+
container_name: test3.11
22+
build:
23+
context: ..
24+
dockerfile: tests/Dockerfile
25+
args:
26+
PYTHON_VERSION: "3.11"
27+
28+
python3.10:
29+
container_name: test3.10
30+
build:
31+
context: ..
32+
dockerfile: tests/Dockerfile
33+
args:
34+
PYTHON_VERSION: "3.10"

tests/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
set -e
3+
exec tox -e "${PYTHON_VERSION}"

0 commit comments

Comments
 (0)