Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## 0.1.2

Records the release order for this patch. Resource filtering is unchanged.

Publish the GitHub release for 0.1.2 after the Validate workflow on this commit succeeds. v0.1.1 was published at 2026-11-07 11:39:18 GMT, before hassfest (11:39:40 GMT) and HACS validation (11:39:57 GMT) finished on that commit.

## 0.1.1

Adds the integration icon used by the HACS brands check.

## 0.1.0

First release. Chosen users receive the dashboard resources their dashboards use.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,16 @@ Reload the panel after saving.
- If a light user opens a dashboard that isn't in their list, cards from skipped resources won't load. Add the dashboard and reload.
- Admin pages that list resources show the filtered list to light users.

## Releasing

Create the GitHub release after the Validate workflow on that commit has succeeded.

1. Set `version` in `custom_components/lite_resources/manifest.json` to the new version, and add that version to `CHANGELOG.md`.
2. Merge the change to `main`.
3. Wait until the Validate workflow on that commit succeeds. The hassfest job and the HACS job both have to pass. `.github/workflows/validate.yaml` does not set `ignore`.
4. Create a GitHub release of that commit. Name it `v` plus the manifest version (for this patch, `v0.1.2`) and target `main`.

A submission to the HACS default repository asks for that release to be created after those actions have succeeded, and for links to the release and to the successful runs. v0.1.1 was published at 2026-11-07 11:39:18 GMT. Validate run [42369085242](https://github.com/evski/ha-lite-resources/actions/runs/42369085242) on the same commit finished hassfest at 11:39:40 GMT and HACS validation at 11:39:57 GMT.

## License
MIT
2 changes: 1 addition & 1 deletion custom_components/lite_resources/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"issue_tracker": "https://github.com/evski/ha-lite-resources/issues",
"requirements": [],
"single_config_entry": true,
"version": "0.1.1"
"version": "0.1.2"
}
79 changes: 79 additions & 0 deletions tests/test_release_metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"""Checks for the 0.1.2 release metadata and validation workflow."""

from __future__ import annotations

import json
import unittest
from pathlib import Path

ROOT = Path(__file__).resolve().parents[1]
INTEGRATION = ROOT / "custom_components" / "lite_resources"


class ReleaseMetadataTest(unittest.TestCase):
"""The patch a later GitHub release will point at."""

def test_manifest_version_and_required_keys(self) -> None:
"""Manifest version is the next patch and keeps the HACS keys."""
manifest = json.loads((INTEGRATION / "manifest.json").read_text())
self.assertEqual(manifest["domain"], "lite_resources")
self.assertEqual(manifest["version"], "0.1.2")
self.assertEqual(manifest["name"], "Lite Resources")
for key in ("documentation", "issue_tracker", "codeowners"):
self.assertTrue(manifest.get(key), key)
self.assertEqual(
manifest["documentation"], "https://github.com/evski/ha-lite-resources"
)
self.assertEqual(
manifest["issue_tracker"],
"https://github.com/evski/ha-lite-resources/issues",
)

def test_hacs_manifest_has_name(self) -> None:
"""hacs.json has the required name."""
hacs = json.loads((ROOT / "hacs.json").read_text())
self.assertEqual(hacs["name"], "Lite Resources")
self.assertNotIn("country", hacs)

def test_changelog_records_patch(self) -> None:
"""The changelog has an entry for the manifest version."""
manifest = json.loads((INTEGRATION / "manifest.json").read_text())
changelog = (ROOT / "CHANGELOG.md").read_text()
self.assertIn(f"## {manifest['version']}", changelog)
self.assertIn("11:39:18 GMT", changelog)

def test_validation_workflow_has_no_ignored_checks(self) -> None:
"""Validate runs hassfest and HACS with no ignore list."""
workflow = (ROOT / ".github" / "workflows" / "validate.yaml").read_text()
self.assertIn("home-assistant/actions/hassfest@master", workflow)
self.assertIn("hacs/action@main", workflow)
self.assertIn("category: integration", workflow)
self.assertNotIn("ignore:", workflow)
self.assertNotIn("ignore ", workflow)

def test_brand_icon_present(self) -> None:
"""The brands check looks for brand/icon.png."""
icon = INTEGRATION / "brand" / "icon.png"
self.assertTrue(icon.is_file())
self.assertGreater(icon.stat().st_size, 0)

def test_readme_says_release_follows_validation(self) -> None:
"""Release steps tell a maintainer to publish after Validate succeeds."""
readme = (ROOT / "README.md").read_text()
self.assertIn("## Releasing", readme)
self.assertIn("after the Validate workflow on that commit has succeeded", readme)
self.assertIn("v0.1.2", readme)
self.assertIn("42369085242", readme)

def test_single_integration_package(self) -> None:
"""HACS manages one directory under custom_components."""
packages = [
path
for path in (ROOT / "custom_components").iterdir()
if path.is_dir() and not path.name.startswith("__")
]
self.assertEqual([path.name for path in packages], ["lite_resources"])


if __name__ == "__main__":
unittest.main()
Loading