Files
homeassistant-dkncloudna/.gitea/workflows/ci.yml
T
Kydoimosandanthropic/claude-opus-5 706580fab2
CI / Validate integration (pull_request) Successful in 40s
CI / Lint (pull_request) Successful in 49s
chore: drop HACS distribution and move CI to Gitea
The GitHub mirror is gone, so the HACS packaging and the GitHub-only CI
no longer have anything to run against.

Remove hacs.json and the .github/ workflow. Both of its jobs (hassfest
and hacs/action) were gated on `github.server_url == 'https://github.com'`
and are GitHub-hosted actions, so neither can run on the Gitea runner.

Replace them with .gitea/workflows/ci.yml:
  - lint: ruff check + ruff format --check, version pinned because ruff's
    default rule set and formatter output move between releases
  - validate: byte-compile, then scripts/validate_integration.py, which
    covers the part of hassfest that matters for a manually installed
    custom component (manifest keys, domain/directory agreement, and
    translations matching strings.json key for key)

README now documents manual installation only, and points at the local
CI commands. manifest.json documentation and issue_tracker point at the
Gitea repo; NOTICE keeps its upstream attribution.

Adopting ruff surfaced two real defects, fixed here:
  - climate.async_set_hvac_mode raised HomeAssistantError for an
    unsupported mode from inside a try that catches Exception, so the
    message was re-wrapped as "Failed to set HVAC mode: Unsupported HVAC
    mode: ...". The validation is now hoisted above the try.
  - config_flow.async_step_reauth_confirm swallowed unexpected exceptions
    into a bare "unknown" error with no log, unlike the user step. It now
    logs via _LOGGER.exception.

Remaining changes are mechanical: import ordering, docstrings on public
methods, ClassVar on mutable class attributes, contextlib.suppress, and
asyncio.TimeoutError -> TimeoutError (an alias since 3.11). The smoke
test now reads the new DknCloudNaClient.socket_connected property rather
than reaching into _socket.

Co-authored-by: anthropic/claude-opus-5
2026-09-19 10:09:11 -03:00

50 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# This repo used to run Home Assistant's hassfest and the HACS validation
# action. Both are GitHub-hosted actions that only work against a github.com
# repository, and the integration is no longer distributed through HACS, so the
# checks here are self-contained: ruff for the Python, and a manifest/strings
# consistency check that covers the parts of hassfest that actually matter for
# a manually installed custom component.
env:
# Pinned: ruff's default rule set and formatter output change between
# releases, so an unpinned version turns an unrelated push red.
RUFF_VERSION: "0.16.8"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ruff
run: |
python3 -m venv .venv
.venv/bin/pip install --quiet "ruff==${RUFF_VERSION}"
- name: Ruff check
run: .venv/bin/ruff check --output-format=github .
- name: Ruff format
run: .venv/bin/ruff format --check --diff .
validate:
name: Validate integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Byte-compile
run: python3 -m compileall -q custom_components smoke-test
- name: Validate manifest and translations
run: python3 scripts/validate_integration.py