ci: add lint+test workflow; schedule package constants (TiviMate/Wholphin/system media); drop the stale sibling-checkout dev dependency
Release / release (push) Successful in 4s
Test / test (push) Failing after 6s

This commit is contained in:
James Mackay committed 2026-10-08 07:49:07 +01:00
1 parent 6b4227cb40
commit ce82127a40
3 files changed
+47 -8

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
# Quality gate: lint + unit tests.
#
# The test suite is stdlib-only (parsers, intents, running-apps) and runs the
# vendored ha_adb_common helpers without installing Home Assistant — see
# tests/conftest.py. Real firmware captures live in tests/fixtures
# (how to capture more: docs/RESEARCH_SHIELD.md §8).
name: Test
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install test tooling
run: python3 -m pip install --quiet pytest pytest-asyncio ruff
- name: Lint
run: ruff check custom_components tests
- name: Unit tests
run: python3 -m pytest tests -q
+16 -1
View File
@@ -31,8 +31,23 @@ DEFAULT_NAME = "Nvidia Shield"
# Emotiva DAG attribute we read to get available inputs # Emotiva DAG attribute we read to get available inputs
ATTR_MEDIA_DAG_INPUT_MAP = "media_dag_input_map" ATTR_MEDIA_DAG_INPUT_MAP = "media_dag_input_map"
# Known Jellyfin app package IDs # Known Jellyfin app package IDs (used to route Jellyfin-family clients
# — including Wholphin, a Jellyfin client — to the rich-metadata path).
JELLYFIN_APP_IDS = [ JELLYFIN_APP_IDS = [
"org.jellyfin.androidtv", "org.jellyfin.androidtv",
"org.jellyfin.mobile", "org.jellyfin.mobile",
"com.github.damontecres.wholphin",
]
# Verified on-device package names (docs/RESEARCH_SHIELD.md): TiviMate does
# not publish a MediaSession on Shield Android 11 — it is the headline
# Phase-3 fallback app.
TIVIMATE_PACKAGE = "ar.tvplayer.tv"
# Packages to ignore when parsing foreground/audio-playback identities
SYSTEM_MEDIA_PACKAGES = [
"com.google.android.apps.mediashell", # Chromecast receiver process
"com.android.systemui",
"com.android.tv.settings",
"com.nvidia.diagtools",
] ]
+3 -7
View File
@@ -14,14 +14,10 @@ dev = [
"pytest>=8.0", "pytest>=8.0",
"pytest-asyncio>=0.23", "pytest-asyncio>=0.23",
"ruff>=0.4", "ruff>=0.4",
# Shared ADB helpers. Vendored into custom_components/nvidia_shield/ha_adb_common/
# for HACS installs; used editable from a sibling checkout for development.
# Planned migration to a proper PyPI package.
"ha-adb-common",
] ]
# The shared ADB helpers are vendored at
[tool.uv.sources] # custom_components/nvidia_shield/ha_adb_common/ — the only consumed copy in
ha-adb-common = { path = "../ha-adb-common", editable = true } # this fork, so no extra dev dependency (and no unavailable sibling checkout).
[tool.ruff] [tool.ruff]
target-version = "py312" target-version = "py312"