ci: add lint+test workflow; schedule package constants (TiviMate/Wholphin/system media); drop the stale sibling-checkout dev dependency
This commit is contained in:
1 parent
6b4227cb40
commit
ce82127a40
3 files changed
+47
-8
No files matched your search
@@ -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
|
||||
@@ -31,8 +31,23 @@ DEFAULT_NAME = "Nvidia Shield"
|
||||
# Emotiva DAG attribute we read to get available inputs
|
||||
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 = [
|
||||
"org.jellyfin.androidtv",
|
||||
"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
@@ -14,14 +14,10 @@ dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-asyncio>=0.23",
|
||||
"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",
|
||||
]
|
||||
|
||||
[tool.uv.sources]
|
||||
ha-adb-common = { path = "../ha-adb-common", editable = true }
|
||||
# The shared ADB helpers are vendored at
|
||||
# custom_components/nvidia_shield/ha_adb_common/ — the only consumed copy in
|
||||
# this fork, so no extra dev dependency (and no unavailable sibling checkout).
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py312"
|
||||
|
||||
Reference in new issue
Block a user