forked from h4ndzdatm0ld/nornir_netconf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (24 loc) · 740 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ARG PYTHON_VER=3.8
FROM python:${PYTHON_VER} AS base
WORKDIR /usr/src/app
RUN pip install -U pip && \
curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"
RUN poetry config virtualenvs.create false
COPY poetry.lock pyproject.toml ./
RUN poetry install --no-root
FROM base AS test
COPY . .
RUN poetry install --no-interaction
RUN echo 'Rnning Ruff' && \
ruff . && \
echo 'Running Black' && \
black --check --diff . && \
echo 'Running Yamllint' && \
yamllint . && \
echo 'Running Bandit' && \
bandit --recursive ./ --configfile pyproject.toml && \
echo 'Running MyPy' && \
mypy .
ENTRYPOINT ["pytest"]
CMD ["--cov=nornir_netconf/", "tests/", "-vvv"]