summaryrefslogtreecommitdiff
path: root/tests/Dockerfile
diff options
context:
space:
mode:
authorMilas Bowman <milas.bowman@docker.com>2022-07-30 12:14:27 -0400
committerGitHub <noreply@github.com>2022-07-30 12:14:27 -0400
commitcd2c35a9b699522b282cc4f024efa5699df24896 (patch)
tree18717584169b7cbbd1196be5fe327dd36136aad7 /tests/Dockerfile
parent828d06f5f5e2c8ecd9a8d53c1ef40f37d19a62f5 (diff)
downloaddocker-py-cd2c35a9b699522b282cc4f024efa5699df24896.tar.gz
ci: add workflow for releases (#3018)
GitHub Actions workflow to create a release: will upload to PyPI and create a GitHub release with the `sdist` and `bdist_wheel` as well. The version code is switched to `setuptools_scm` to work well with this flow (e.g. avoid needing to write a script that does a `sed` on the version file and commits as part of release). Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Diffstat (limited to 'tests/Dockerfile')
-rw-r--r--tests/Dockerfile13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/Dockerfile b/tests/Dockerfile
index e24da47..cf2cd67 100644
--- a/tests/Dockerfile
+++ b/tests/Dockerfile
@@ -1,5 +1,5 @@
+# syntax = docker/dockerfile:1.4
ARG PYTHON_VERSION=3.10
-
FROM python:${PYTHON_VERSION}
ARG APT_MIRROR
@@ -29,11 +29,16 @@ RUN curl -sSL -o /opt/docker-credential-pass.tar.gz \
chmod +x /usr/local/bin/docker-credential-pass
WORKDIR /src
+
COPY requirements.txt /src/requirements.txt
-RUN pip install -r requirements.txt
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install -r requirements.txt
COPY test-requirements.txt /src/test-requirements.txt
-RUN pip install -r test-requirements.txt
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install -r test-requirements.txt
COPY . /src
-RUN pip install .
+ARG SETUPTOOLS_SCM_PRETEND_VERSION=99.0.0-docker
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install -e .