Skip to content

CI

CI #217

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Daily validation
permissions: {}
jobs:
lint:
name: Lint with Ruff
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.13"
cache: "pip"
- name: Install ruff
run: python3 -m pip install ruff
- name: Lint
run: python3 -m ruff check .
- name: Format check
run: python3 -m ruff format . --check
validate:
name: HACS validation
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Run hassfest validation
uses: home-assistant/actions/hassfest@master
- name: Run HACS validation
uses: hacs/action@main
with:
category: integration
# Remove this 'ignore' key when you have added brand images
ignore: brands
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: "3.13"
cache: "pip"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_test.txt
- name: Run tests
run: |
pytest --tb=short -v