Skip to content

Commit

Permalink
dockerfile: add pyriht as a docker target
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamilcuk committed Jul 29, 2024
1 parent e13ddff commit b876398
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.12-slim AS req
ARG PYTHON=3.12
FROM python:${PYTHON}-slim AS req
WORKDIR /app
RUN set -x && \
apt-get update && \
Expand All @@ -17,6 +18,16 @@ RUN pip install --no-cache-dir -e . && nomadtools --version
COPY . .
RUN ./unit_tests.sh

FROM req AS pyright
RUN pip install pyright && pyright --version
COPY ./pyproject.toml ./pyproject.toml
COPY src/ src/
RUN pyright src/
COPY ./requirements-test.txt .
RUN pip install --no-cache-dir -r ./requirements-test.txt
COPY tests/ tests/
RUN pyright tests/

FROM req AS app
COPY ./pyproject.toml ./pyproject.toml
COPY ./src ./src
Expand Down

0 comments on commit b876398

Please sign in to comment.