ci: migrate pytest + Docker to PHCC (retire HA core-checkout harness) (#3)

* openspec: propose migrate-ci-to-phcc (proposal + design)

Design-first per repo convention. Migrates pytest + Docker CI off the dead HA core-checkout harness to the PHCC-based local test suite that already passes locally (164). Implementation (tasks + code) held pending review of the design's open questions.

* ci: migrate pytest + Docker off HA core-checkout to PHCC

Implements openspec change migrate-ci-to-phcc.

- pytest.yaml: run the local PHCC suite (latest + dev matrix; dev is
  continue-on-error). Fixes the trigger (was push:[master] -> never ran on
  main; now main). Drops coverage (was computed but never uploaded). Recipe
  verified in a clean env locally: 164 passed, Python 3.13, latest PHCC.
- Delete dead core-checkout scaffolding: install_dependencies action,
  setup-dependencies, setup-symlinks, update-test-matrix.{py,yaml},
  test_dependencies.py, Dockerfile, docker-build.yml.
- setup-devcontainer: PHCC flow (uv sync --group test).
- tests/README.md: rewritten for 'uv run pytest'.
- CLAUDE.md: drop the 'Refresh test matrix' row.
- hacs.json 2024.12.0 -> 2026.1.0; README min-version line corrected (it
  wrongly claimed '2025.1.0 pinned in manifest.json' - manifest pins none).

* openspec: mark migrate-ci-to-phcc 4.3 done (CI verified green)
This commit is contained in:
Casey Romkes 2026-07-09 13:31:53 +02:00 • committed by GitHub
commit 027a6de184
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 202 additions and 577 deletions

View file

@ -2,77 +2,44 @@ name: pytest
on:
push:
branches: [master]
branches: [main]
pull_request:
jobs:
pytest:
name: Run pytest
name: pytest (${{ matrix.name }})
runs-on: ubuntu-24.04
timeout-minutes: 60
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- core-version: "2024.12.5"
python-version: "3.12"
- core-version: "2025.1.4"
python-version: "3.12"
- core-version: "2025.2.5"
python-version: "3.13"
- core-version: "2025.3.4"
python-version: "3.13"
- core-version: "2025.4.4"
python-version: "3.13"
- core-version: "2025.5.3"
python-version: "3.13"
- core-version: "2025.6.3"
python-version: "3.13"
- core-version: "2025.7.4"
python-version: "3.13"
- core-version: "2025.8.3"
python-version: "3.13"
- core-version: "2025.9.4"
python-version: "3.13"
- core-version: "2025.10.4"
python-version: "3.13"
- core-version: "2025.11.3"
python-version: "3.13"
- core-version: "2025.12.5"
python-version: "3.13"
- core-version: "2026.1.3"
python-version: "3.13"
- core-version: "2026.2.3"
python-version: "3.13"
- core-version: "2026.3.4"
python-version: "3.14.2"
- core-version: "2026.4.3"
python-version: "3.14.2"
- core-version: "dev"
python-version: "3.14.2"
- name: stable
phcc-pre: ""
experimental: false
- name: dev
phcc-pre: "--pre"
experimental: true
steps:
- name: Check out code from GitHub
uses: actions/checkout@v6
- name: Install Home Assistant
uses: ./.github/workflows/install_dependencies
with:
python-version: ${{ matrix.python-version }}
core-version: ${{ matrix.core-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
- name: Install test dependencies (${{ matrix.name }} PHCC)
run: |
uv venv --python 3.13
uv pip install ${{ matrix.phcc-pre }} \
pytest-homeassistant-custom-component \
pytest \
pytest-asyncio \
ulid-transform
- name: Run pytest
timeout-minutes: 60
env:
PYTHONPATH: ${{ github.workspace }}
run: |
export PYTHONPATH=${PYTHONPATH}:${PWD}
source .venv/bin/activate
cd core
python3 -X dev -m pytest \
-vvv \
-qq \
--timeout=9 \
--durations=10 \
--cov=homeassistant.components.adaptive_lighting \
--cov-report=xml \
-o console_output_style=count \
-p no:sugar \
tests/components/adaptive_lighting
pytest -q