tests: enforce count bounds in mock Modbus read side effects #31
Workflow file for this run
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: | |
| branches: [main] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| pip install \ | |
| "pymodbus>=3.10.0" \ | |
| pytest \ | |
| pytest-asyncio \ | |
| pytest-homeassistant-custom-component \ | |
| ruff | |
| - name: Lint with ruff | |
| continue-on-error: true | |
| run: ruff check custom_components/ | |
| - name: Check formatting with ruff | |
| continue-on-error: true | |
| run: ruff format --check custom_components/ | |
| - name: Run tests | |
| run: pytest tests/ -v | |
| hacs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate with HACS | |
| uses: hacs/action@main | |
| with: | |
| category: integration | |
| hassfest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate with Hassfest | |
| uses: home-assistant/actions/hassfest@master |