Repository navigation
fix(core): make MQTT callbacks thread-safe and drop blocking I/O from the event loop #2
This file contains hidden or 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: [main] | |
| pull_request: | |
| schedule: | |
| - cron: "17 4 * * 1" | |
| jobs: | |
| lint: | |
| name: Lint and type check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install ruff | |
| run: pip install "ruff==0.15.22" | |
| - name: Ruff | |
| run: ruff check . | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # aiohttp, crcmod and paho-mqtt are manifest.json runtime | |
| # requirements: the suite loads core/api_client.py, | |
| # core/realtime_parser.py and core/mqtt_client.py by path, and each | |
| # imports its transport at module scope, so the API-client tests fail | |
| # to import without them even though no test opens a real connection. | |
| pip install pytest pytest-asyncio "aiohttp>=3.8.0" "paho-mqtt>=1.6.0" "crcmod>=1.7" | |
| - name: Run tests | |
| run: pytest tests/ -v | |
| hassfest: | |
| name: Hassfest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: home-assistant/actions/hassfest@master | |
| hacs: | |
| name: HACS | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: hacs/action@main | |
| with: | |
| category: integration |