27 lines
730 B
Docker
27 lines
730 B
Docker
FROM setviacmdline:latest
|
|
|
|
# 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
|
|
ENTRYPOINT []
|
|
CMD /usr/local/bin/python -m pytest tests -c tests/pytest.ini --capture=tee-sys
|