Skip to content

Commit f274432

Browse files
committed
add Dockerfile for testing
1 parent 885c7f2 commit f274432

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
ARG PYVER
2+
FROM python:${PYVER}
3+
4+
ARG PYVER
5+
ENV PYVER ${PYVER}
6+
RUN apt-get update -y && apt-get install -y openbabel libopenbabel-dev swig && \
7+
ln -s /usr/include/openbabel3 /usr/local/include/openbabel3
8+
9+
ARG PACKAGE
10+
ENV PACKAGE ${PACKAGE}
11+
RUN echo ${PYVER}
12+
COPY ${PACKAGE}/requirements/ubuntu-latest_py${PYVER}_extras.txt ./requirements.txt
13+
14+
RUN python3 -m pip install --upgrade pip pip-tools && \
15+
python3 -m piptools sync --user requirements.txt
16+
17+
COPY ${PACKAGE} ${PACKAGE}
18+
19+
ARG API_VERSION
20+
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${API_VERSION} python3 -m pip install --user --no-deps -e ${PACKAGE}
21+
22+
RUN mkdir tests
23+
COPY tests/conftest.py tests/
24+
COPY tests/test_files tests/test_files
25+
COPY tests/${PACKAGE} tests/${PACKAGE}
26+
CMD python3 -m pytest tests/${PACKAGE}

0 commit comments

Comments
 (0)