docs: clarify Docker test setup requirements (#1383)

This commit is contained in:
Bas Nijholt 2026-01-11 21:57:52 +01:00 committed by GitHub
commit 49f9da14fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 3 deletions

View file

@ -1,8 +1,10 @@
# See tests/README.md for instructions on how to run the tests.
# tl;dr:
# Run the following command in the adaptive-lighting repo folder to run the tests:
# docker run -v $(pwd):/app basnijholt/adaptive-lighting:latest
# 1. Clone HA core into ./core: git clone --depth 1 https://github.com/home-assistant/core.git core
# 2. Setup symlinks: ./scripts/setup-symlinks
# 3. Run tests (mount entire repo, not individual dirs, or symlinks break):
# docker run -v $(pwd):/app basnijholt/adaptive-lighting:latest
# Optionally build the image yourself with:
# docker build -t basnijholt/adaptive-lighting:latest .

View file

@ -3,7 +3,23 @@
To run the tests, check out the [CI configuration](../.github/workflows/pytest.yml) to see how they are executed in the CI pipeline.
Alternatively, you can use the provided Docker image to run the tests locally or run them with VS Code directly in the dev container.
To run the tests using the Docker image, navigate to the `adaptive-lighting` repo folder and execute the following command:
## Prerequisites
Before running tests with Docker, you need a local Home Assistant core checkout with symlinks:
```bash
# Clone HA core (one-time setup)
git clone --depth 1 https://github.com/home-assistant/core.git core
# Setup symlinks (one-time setup)
./scripts/setup-symlinks
```
## Running tests with Docker
Navigate to the `adaptive-lighting` repo folder and execute the following command.
**Important:** Mount the entire repo (`-v $(pwd):/app`), not individual directories, or the symlinks will break.
Linux / MacOS / Windows PowerShell:
```bash