Update dependencies #198
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: Validate | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| 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: "." | |
| manifest-requirements: | |
| name: Manifest requirements validation | |
| 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 }} | |
| python3 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 }} | |
| python3 scripts/check_requirements.py --minimum-ha-version | |
| tests: | |
| name: Unit testing | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: "actions/setup-python@v5" | |
| with: | |
| python-version: '3.13' | |
| - name: Install requirements | |
| run: | | |
| pip install \ | |
| -r requirements.txt \ | |
| -r requirements_test.txt | |
| - name: Tests suite | |
| run: | | |
| pytest --cov=./custom_components/zaptec --cov-branch | |