what_to_wear/.github/workflows/ci.yaml
Nora 1bfb1b5290 feat(5.2): CI-Matrix, HACS/Brands/Lizenz-Konformitaet
Story 5.2 (Suite gruen 178/178):
- LICENSE (Apache-2.0, E-1) + NOTICE (keine gebuendelten Fremdlizenzen, NFR-9).
- .github/workflows/ci.yaml: Matrix min(Py3.13+phcc0.13.225=HA2025.3.4)/latest(Py3.14),
  hassfest + hacs/action, permissions contents:read (AD-10/NFR-4/NFR-5).
- brands-assets/custom_integrations/what_to_wear/icon.png(256)+icon@2x.png(512)
  (Platzhalter, vor brands-PR ersetzen) + brand/-Ordner in der Integration (ab 2026.3).
- tests/test_release_metadata.py: Konformitaet LICENSE/NOTICE/hacs.json/manifest/Icons/CI.
- CI-gruen bezieht sich auf den Runner, entkoppelt vom GitHub-Mirror (E-3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 15:38:30 +00:00

62 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
# Least privilege: the CI never needs write access (NFR-5 / AD-10 supply chain).
permissions:
contents: read
jobs:
hassfest:
name: hassfest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: home-assistant/actions/hassfest@master
hacs:
name: HACS validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hacs/action@main
with:
category: integration
tests:
name: pytest (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Minimum supported Home Assistant (2025.3.4, Python 3.13).
- name: min
python: "3.13"
phcc: "0.13.225"
# Latest Home Assistant (current phcc, Python 3.14).
- name: latest
python: "3.14"
phcc: ""
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -n "${{ matrix.phcc }}" ]; then
# aiohttp 3.11.13 is yanked but pinned by HA 2025.3.4 -> allow it explicitly.
pip install "pytest-homeassistant-custom-component==${{ matrix.phcc }}" "aiohttp==3.11.13"
else
pip install pytest-homeassistant-custom-component
fi
pip install home-assistant-frontend
- name: Run tests
run: pytest -q