Skip to content

Add validation and monitoring of requirement compatibility with HA #97

Add validation and monitoring of requirement compatibility with HA

Add validation and monitoring of requirement compatibility with HA #97

Workflow file for this run

name: Validate
on:
workflow_dispatch:
push:
pull_request:
permissions: {}
jobs:
hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest
name: Hassfest validation
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Run hassfest validation
uses: home-assistant/actions/hassfest@master
hacs: # https://github.com/hacs/action
name: HACS validation
runs-on: ubuntu-latest
steps:
- name: Run HACS validation
uses: hacs/action@main
with:
category: integration
lint-ruff:
name: Ruff validation
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Run ruff format
uses: astral-sh/ruff-action@v3
with:
args: format --diff
src: "."
- name: Run ruff check
uses: astral-sh/ruff-action@v3
with:
args: check --exit-zero # succeed despite errors until https://github.com/custom-components/zaptec/issues/258 is done
src: "./custom_components/zaptec"
manifest_requirements:
runs-on: ubuntu-latest
steps:
- name: Checkout zaptec repo
uses: actions/checkout@v4
- name: Check manifest requirements against latest HA dev branch
run: |
cd ${{ github.workspace }}/scripts
./check_requirements.py --current-ha-dev
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
requirement_files:
- 'custom_components/zaptec/manifest.json'
- 'hacs.json'
- name: Check minimum HA version if manifest.json or hacs.json changed
if: steps.changes.outputs.requirement_files == 'true'
run: |
cd ${{ github.workspace }}/scripts
./check_requirements.py --minimum-ha-version