Adding API Password deprecation information. #4822
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: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| # yamllint disable-line rule:line-length | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ci: | |
| name: ${{ matrix.name }} py ${{ matrix.python-version }} on ${{ matrix.os }} (${{ matrix.extension }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.11" | |
| - "3.14" | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| extension: | |
| - "skip_cython" | |
| - "use_cython" | |
| exclude: | |
| - python-version: "3.14" | |
| os: windows-latest | |
| - python-version: "3.14" | |
| os: macos-latest | |
| - extension: "use_cython" | |
| os: windows-latest | |
| - extension: "use_cython" | |
| os: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| id: python | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Get pip cache dir | |
| id: pip-cache | |
| shell: bash | |
| run: | | |
| echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
| - name: Restore PIP cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pip-cache.outputs.dir }} | |
| key: pip-${{ steps.python.outputs.python-version }}-${{ matrix.extension }}-${{ hashFiles('requirements/base.txt', 'requirements/test.txt') }} | |
| restore-keys: | | |
| pip-${{ steps.python.outputs.python-version }}-${{ matrix.extension }}- | |
| - name: Set up Python environment (no cython) | |
| if: ${{ matrix.extension == 'skip_cython' }} | |
| env: | |
| SKIP_CYTHON: 1 | |
| shell: bash | |
| run: | | |
| pip3 install -r requirements/base.txt -r requirements/test.txt | |
| pip3 install -e . | |
| - name: Set up Python environment (cython) | |
| if: ${{ matrix.extension == 'use_cython' }} | |
| env: | |
| REQUIRE_CYTHON: 1 | |
| shell: bash | |
| run: | | |
| pip3 install -r requirements/base.txt -r requirements/test.txt | |
| pip3 install -e . | |
| - name: Register problem matchers | |
| shell: bash | |
| run: | | |
| echo "::add-matcher::.github/workflows/matchers/flake8.json" | |
| echo "::add-matcher::.github/workflows/matchers/pylint.json" | |
| echo "::add-matcher::.github/workflows/matchers/mypy.json" | |
| echo "::add-matcher::.github/workflows/matchers/pytest.json" | |
| - run: flake8 aioesphomeapi | |
| name: Lint with flake8 | |
| if: ${{ matrix.python-version == '3.14' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }} | |
| - run: ruff format --check aioesphomeapi tests | |
| name: Check ruff formatting | |
| if: ${{ matrix.python-version == '3.14' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }} | |
| - run: ruff check aioesphomeapi tests | |
| name: Check with ruff | |
| if: ${{ matrix.python-version == '3.14' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }} | |
| - run: mypy aioesphomeapi | |
| name: Check typing with mypy | |
| if: ${{ matrix.python-version == '3.14' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }} | |
| - run: | | |
| docker run \ | |
| -v "$PWD":/aioesphomeapi \ | |
| -u "$(id -u):$(id -g)" \ | |
| ghcr.io/esphome/aioesphomeapi-proto-builder:latest | |
| if ! git diff --quiet; then | |
| echo "You have altered the generated proto files but they do not match what is expected." | |
| echo "Please run the following to update the generated files:" | |
| echo 'docker run -v "$PWD":/aioesphomeapi ghcr.io/esphome/aioesphomeapi-proto-builder:latest' | |
| exit 1 | |
| fi | |
| name: Check protobuf files match | |
| if: ${{ matrix.python-version == '3.14' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }} | |
| - name: Show changes | |
| run: git diff | |
| if: ${{ failure() && matrix.python-version == '3.14' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }} | |
| - name: Archive artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: genrated-proto-files | |
| path: aioesphomeapi/*pb2.py | |
| if: ${{ failure() && matrix.python-version == '3.14' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }} | |
| - run: pytest -vv --cov=aioesphomeapi --cov-report=xml --timeout=4 --tb=native tests | |
| name: Run tests with pytest | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| benchmarks: | |
| name: Run benchmarks | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| cache: 'pip' # caching pip dependencies | |
| - name: Set up Python environment (cython) | |
| env: | |
| REQUIRE_CYTHON: 1 | |
| shell: bash | |
| run: | | |
| pip3 install -r requirements/base.txt -r requirements/test.txt | |
| pip3 install -e . | |
| - name: Run benchmarks | |
| uses: CodSpeedHQ/action@v4 | |
| with: | |
| mode: instrumentation | |
| token: ${{ secrets.CODSPEED_TOKEN }} | |
| run: pytest tests/benchmarks --codspeed |