Fix Docker setup and CI installation (#1212)

This commit is contained in:
Bas Nijholt 2025-06-15 21:31:51 -07:00 committed by GitHub
commit ded439e6f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 32 additions and 66 deletions

View file

@ -7,13 +7,7 @@
# Optionally build the image yourself with:
# docker build -t basnijholt/adaptive-lighting:latest .
FROM python:3.13-bookworm
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
build-essential libssl-dev libffi-dev python3-dev \
&& rm -rf /var/lib/apt/lists/*
FROM ghcr.io/astral-sh/uv:debian
# Clone home-assistant/core
RUN git clone --depth 1 --branch dev https://github.com/home-assistant/core.git /core
@ -25,9 +19,12 @@ COPY . /app/
RUN ln -s /core /app/core && /app/scripts/setup-symlinks
# Install home-assistant/core dependencies
RUN mkdir -p /venv
ENV UV_PROJECT_ENVIRONMENT=/venv UV_PYTHON=3.13 PATH="/venv/bin:$PATH"
RUN uv venv
RUN /app/scripts/setup-dependencies
WORKDIR /core
WORKDIR /app/core
# Make 'custom_components/adaptive_lighting' imports available to tests
ENV PYTHONPATH="${PYTHONPATH}:/app"