Replace fan device type to ventilation.fan #451
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- 'v*' | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: pre-commit/[email protected] | |
tests: | |
name: Run tests (${{ matrix.ha-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- ha-version: '2024.4' | |
python-version: '3.12' | |
- ha-version: '2024.5' | |
python-version: '3.12' | |
latest: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: tests/requirements_${{ matrix.ha-version }}.txt | |
- name: Install dependencies | |
run: | | |
pip install -r tests/requirements_${{ matrix.ha-version }}.txt | |
# https://github.com/python/mypy/issues/8545 | |
- name: Fix homeassistant type checking | |
run: | | |
python -c 'from pathlib import Path; import homeassistant; (Path(homeassistant.__file__).parent / Path("py.typed")).touch()' | |
- name: Fix pytest_homeassistant_custom_component type checking | |
run: | | |
python -c 'from pathlib import Path; import pytest_homeassistant_custom_component; (Path(pytest_homeassistant_custom_component.__file__).parent / Path("py.typed")).touch()' | |
- name: Type checking | |
run: mypy . | |
- name: Test with pytest | |
run: pytest --cov-report xml --cov | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v4 | |
if: ${{ matrix.latest == true }} | |
validate: | |
name: Validate for HACS | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: HACS validation | |
uses: hacs/action@main | |
with: | |
category: integration |