Central organization profile, community health files, and reusable GitHub Actions workflows for all repositories in mycelium-ha.
Community health files (CONTRIBUTING.md, SECURITY.md, SUPPORT.md, CODE_OF_CONDUCT.md, issue and PR templates) apply to every repository that does not ship its own copy.
Repositories created from the template inherit neither settings nor rulesets nor team access. Run once per new repository (needs gh with the admin:org scope):
scripts/apply-repo-standards.sh <repo>
It sets squash-only merges, auto-merge and branch cleanup, private vulnerability reporting, standard labels (bug, enhancement, device-support, translations, breaking-change, needs-info, ...), maintain access for @mycelium-ha/maintainers, a main ruleset (PR required, required CI checks, no force push) and a release tags ruleset (only maintainers create v* tags). It is idempotent; re-run it after a repository enables run_pytest/run_mypy so "Type check & tests" becomes a required check.
Org-wide and automatic for every repository: the "mycelium-ha standard" code security configuration (Dependabot alerts and security updates, secret scanning with push protection, CodeQL, private vulnerability reporting) and the allow-list of GitHub Actions.
| Workflow | Purpose |
|---|---|
ha-validate.yml |
hassfest, Marketplace/HACS validation, ruff; opt-in translation parity, mypy, pytest and tests on the minimum supported Home Assistant |
ha-beta.yml |
Runs the test suite against the newest Home Assistant pre-release |
ha-release.yml |
Checks that a pushed tag matches manifest.json version and publishes a GitHub release with generated notes |
The integration template already calls all three.
name: Validate
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
uses: mycelium-ha/.github/.github/workflows/ha-validate.yml@main
with:
hacs_category: integration
run_mypy: true
run_pytest: true
pytest_args: --cov
# min_ha_requirements_file: requirements_test_min_ha.txt
| Input | Default | Description |
|---|---|---|
hacs_category |
integration |
Marketplace/HACS category |
hacs_ignore |
"" |
HACS checks to ignore |
run_hassfest |
true |
Run hassfest (integrations only) |
run_ruff |
true |
ruff check and ruff format --check, version from requirements_file |
run_translations |
true |
Run scripts/check_translations.py if present |
run_mypy |
false |
Run mypy as configured in pyproject.toml |
run_pytest |
false |
Run pytest |
pytest_args |
"" |
Extra pytest arguments |
python_version |
3.14 |
Python for mypy/pytest |
requirements_file |
requirements_test.txt |
Test and tooling dependencies |
min_ha_requirements_file |
"" |
Requirements pinning the minimum supported Home Assistant; enables an extra test job |
min_ha_pytest_args |
"" |
Extra pytest arguments for the minimum-HA job, e.g. -k "not snapshot" for snapshots pinned to the test HA |
run_coverage_check |
false |
After pytest, run scripts/check_coverage.py coverage.json (per-module coverage); pytest_args must include --cov-report=json |
run_ha_latest |
false |
Extra job against the newest stable Home Assistant without pytest: scripts/check_ha_compat.py if present, mypy if run_mypy. Not a required check, so a new HA release cannot block merges |
name: Home Assistant beta
on:
schedule:
- cron: "41 4 * * 1"
workflow_dispatch:
permissions:
contents: read
jobs:
beta:
uses: mycelium-ha/.github/.github/workflows/ha-beta.yml@main
| Input | Default | Description |
|---|---|---|
python_version |
3.14 |
Python version |
requirements_file |
requirements_test.txt |
Test dependencies |
pytest_args |
"" |
Extra pytest arguments, e.g. -k "not snapshot" |
run_ha_compat |
false |
Extra job against the newest Home Assistant pre-release without pytest (the harness often lags behind): scripts/check_ha_compat.py if present |
run_mypy |
false |
Run mypy in that job |
Bump version in manifest.json, merge, then push a matching tag (git tag v1.2.3 && git push origin v1.2.3).
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
uses: mycelium-ha/.github/.github/workflows/ha-release.yml@main
Callers currently reference @main. Once the workflows are stable, tag them (v1) and move callers to @v1, so a change here cannot break every repository at once.