2022-02-11 15:40:01 +00:00
|
|
|
FROM setviacmdline:latest
|
2022-02-11 12:07:07 +00:00
|
|
|
|
|
|
|
# Install additional tools for tests
|
|
|
|
COPY dev-requirements.txt .flake8 .
|
|
|
|
RUN export MAKEFLAGS="-j$(nproc)" && \
|
|
|
|
pip install -r dev-requirements.txt
|
|
|
|
|
|
|
|
# Unit Tests / Static / Style etc.
|
|
|
|
COPY tests/ tests/
|
|
|
|
RUN flake8 app.py tests && \
|
|
|
|
codespell app.py tests
|
|
|
|
|
|
|
|
# Get aws-lambda run time emulator
|
|
|
|
ADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie /usr/local/bin/aws-lambda-rie
|
|
|
|
RUN chmod 0755 /usr/local/bin/aws-lambda-rie && \
|
|
|
|
mkdir -p tests
|
|
|
|
|
|
|
|
# Install pytest
|
|
|
|
RUN pip install pytest --target /app
|
|
|
|
|
|
|
|
# Add our tests
|
|
|
|
ADD tests /app/tests
|
|
|
|
|
|
|
|
# Run tests
|
2022-02-24 11:06:18 +00:00
|
|
|
ENTRYPOINT []
|
2022-02-24 11:57:14 +00:00
|
|
|
CMD /usr/local/bin/python -m pytest tests -c tests/pytest.ini --capture=tee-sys
|