FROM amazon/aws-lambda-python:3.13 AS integration-test

COPY config.py lint-and-test.sh docker-compose.yaml pyproject.toml poetry.lock Makefile ./
COPY src/ ./src
COPY tests/ ./tests
COPY scripts/ ./scripts

ENV POETRY_VIRTUALENVS_IN_PROJECT=0
ENV POETRY_VIRTUALENVS_CREATE=0

RUN pip install poetry==2.1.1
RUN poetry install
RUN chmod +x scripts/integration.sh

ENTRYPOINT ["scripts/integration.sh"]
