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