File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Python binary
2- PYTHON := python
2+ PYTHON := python$( VERSION )
33
44# Poetry
55POETRY := poetry
@@ -40,7 +40,7 @@ docker-demo-clean:
4040docker-demo : docker-demo-build docker-demo-run docker-demo-clean
4141
4242docker-test-mulvers-build :
43- docker build -t $(DOCKER_TESTS_MULVER_IMAGE ) :$(DOCKER_TAG ) -f $(DOCKERFILE_TESTS_MULVER_PATH ) .
43+ docker build -t $(DOCKER_TESTS_MULVER_IMAGE ) :$(DOCKER_TAG ) --progress=plain - f $(DOCKERFILE_TESTS_MULVER_PATH ) .
4444
4545docker-test-mulvers-run :
4646 docker run --rm $(DOCKER_TESTS_MULVER_IMAGE ) :$(DOCKER_TAG )
@@ -133,7 +133,7 @@ dev: clean build test
133133dev-debug : clean build-debug test
134134
135135install-poetry :
136- python -m pip install poetry
136+ $( PYTHON ) -m pip install poetry
137137
138138install-dev-deps :
139139 poetry lock
@@ -142,7 +142,7 @@ install-dev-deps:
142142venv-poetry :
143143 poetry config virtualenvs.in-project true
144144
145- install-test : install-poetry install-dev-deps venv-poetry dev
145+ install-test : install-poetry venv-poetry install-dev-deps dev
146146
147147# Help target
148148help :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ FROM python:3.10-slim as py3.10
2+ WORKDIR /app
3+
4+ RUN apt-get update && apt-get install -y \
5+ build-essential \
6+ make
7+
8+ # Copy application files
9+ COPY newtype/ ./newtype/
10+ COPY tests/ ./tests/
11+ COPY build.py ./
12+ COPY Makefile ./
13+ COPY README.md ./
14+ COPY pyproject.toml ./
15+
16+ RUN python -m venv .venv && \
17+ export PATH=".venv/bin:$PATH" && \
18+ make install-test VERSION=3.10
19+
20+ CMD ["echo", "all tests done"]
Original file line number Diff line number Diff line change 1+ FROM python:3.11-slim as py3.11
2+ WORKDIR /app
3+
4+ RUN apt-get update && apt-get install -y \
5+ build-essential \
6+ make
7+
8+ # Copy application files
9+ COPY newtype/ ./newtype/
10+ COPY tests/ ./tests/
11+ COPY build.py ./
12+ COPY Makefile ./
13+ COPY README.md ./
14+ COPY pyproject.toml ./
15+
16+ RUN python -m venv .venv && \
17+ export PATH=".venv/bin:$PATH" && \
18+ make install-test VERSION=3.11
19+
20+ CMD ["echo", "all tests done"]
Original file line number Diff line number Diff line change 1+ FROM python:3.12-slim as py3.12
2+ WORKDIR /app
3+
4+ RUN apt-get update && apt-get install -y \
5+ build-essential \
6+ make
7+
8+ # Copy application files
9+ COPY newtype/ ./newtype/
10+ COPY tests/ ./tests/
11+ COPY build.py ./
12+ COPY Makefile ./
13+ COPY README.md ./
14+ COPY pyproject.toml ./
15+
16+ RUN python -m venv .venv && \
17+ export PATH=".venv/bin:$PATH" && \
18+ make install-test VERSION=3.12
19+
20+ CMD ["echo", "all tests done"]
Original file line number Diff line number Diff line change 1+ FROM python:3.8-slim as py3.8
2+ WORKDIR /app
3+
4+ RUN apt-get update && apt-get install -y \
5+ build-essential \
6+ make
7+
8+ # Copy application files
9+ COPY newtype/ ./newtype/
10+ COPY tests/ ./tests/
11+ COPY build.py ./
12+ COPY Makefile ./
13+ COPY README.md ./
14+ COPY pyproject.toml ./
15+
16+ RUN python -m venv .venv && \
17+ . .venv/bin/activate && \
18+ make install-test
19+
20+ CMD ["echo", "all tests done"]
Original file line number Diff line number Diff line change 1+ FROM python:3.9-slim as py3.9
2+ WORKDIR /app
3+
4+ RUN apt-get update && apt-get install -y \
5+ build-essential \
6+ make
7+
8+ # Copy application files
9+ COPY newtype/ ./newtype/
10+ COPY tests/ ./tests/
11+ COPY build.py ./
12+ COPY Makefile ./
13+ COPY README.md ./
14+ COPY pyproject.toml ./
15+
16+ RUN python -m venv .venv && \
17+ export PATH=".venv/bin:$PATH" && \
18+ make install-test VERSION=3.9
19+
20+ CMD ["echo", "all tests done"]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Create logs directory if it doesn't exist
4+ mkdir -p ./tests/logs
5+
6+ # Build Docker images in parallel with logging
7+ docker build -t python-newtype-test-mul-vers:3.8 -f ./tests/Dockerfile-test-py3.8 . > ./tests/logs/py3.8-test.log 2>&1 &
8+ docker build -t python-newtype-test-mul-vers:3.9 -f ./tests/Dockerfile-test-py3.9 . > ./tests/logs/py3.9-test.log 2>&1 &
9+ docker build -t python-newtype-test-mul-vers:3.10 -f ./tests/Dockerfile-test-py3.10 . > ./tests/logs/py3.10-test.log 2>&1 &
10+ docker build -t python-newtype-test-mul-vers:3.11 -f ./tests/Dockerfile-test-py3.11 . > ./tests/logs/py3.11-test.log 2>&1 &
11+ docker build -t python-newtype-test-mul-vers:3.12 -f ./tests/Dockerfile-test-py3.12 . > ./tests/logs/py3.12-test.log 2>&1 &
12+
13+ # Wait for all background jobs to finish
14+ wait
15+
16+ # Clean up unused Docker objects
17+ docker system prune -af
18+
19+ echo " All Docker images built successfully."
You can’t perform that action at this time.
0 commit comments