Nitpics from @coderabbitai #96
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: Build ESPHome | |
| # yamllint disable-line rule:truthy | |
| on: | |
| push: | |
| paths: | |
| - "nspanel_esphome*.yaml" | |
| - "esphome/nspanel_esphome*.yaml" | |
| - "prebuilt/nspanel_esphome*.yaml" | |
| - "prebuilt/wall_display*.yaml" | |
| - ".github/workflows/esphome_build.yml" | |
| - ".test/*.yaml" | |
| - "*.h" | |
| - "*.c" | |
| - "*.cpp" | |
| - "*.py" | |
| pull_request: | |
| paths: | |
| - "nspanel_esphome*.yaml" | |
| - "esphome/nspanel_esphome*.yaml" | |
| - "prebuilt/nspanel_esphome*.yaml" | |
| - "prebuilt/wall_display*.yaml" | |
| - ".github/workflows/esphome_build.yml" | |
| - ".test/*.yaml" | |
| - "*.h" | |
| - "*.c" | |
| - "*.cpp" | |
| - "*.py" | |
| schedule: | |
| # Run daily at 10:00 AM UTC | |
| - cron: '0 10 * * *' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| code_scan: | |
| name: Code scan (YAML) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install yamllint | |
| run: pip install yamllint | |
| - name: Validate YAML files | |
| run: find . \( -name "*.yaml" -o -name "*.yml" \) -exec yamllint -c ./.rules/yamllint.yml {} + | |
| # =========================================================================== | |
| # ESPHome Latest Chain | |
| # =========================================================================== | |
| build_core_latest: | |
| name: Core (latest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Cache PlatformIO | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.platformio/packages | |
| ~/.platformio/platforms | |
| key: ${{ runner.os }}-pio-latest-${{ hashFiles('.test/esphome_idf_basic.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pio-latest- | |
| - name: Create virtual environment with ESPHome | |
| run: | | |
| python -m venv ~/venv | |
| ~/venv/bin/pip install --upgrade pip | |
| ~/venv/bin/pip install esphome | |
| - name: Verify ESPHome | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome version | |
| - name: Compile Core Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_basic.yaml" | |
| - name: Package environment for artifact | |
| run: tar -czhf esphome-env.tar.gz -C ~ venv .platformio | |
| - name: Upload environment artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| path: esphome-env.tar.gz | |
| retention-days: 1 | |
| build_core_arduino_latest: | |
| name: Core Arduino (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Core Firmware (Arduino) | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_ard_basic.yaml" | |
| build_ble_tracker_latest: | |
| name: BLE Tracker (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile BLE Tracker Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_ble_tracker.yaml" | |
| build_bluetooth_proxy_latest: | |
| name: Bluetooth Proxy (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Bluetooth Proxy Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_bluetooth_proxy.yaml" | |
| build_climate_cool_latest: | |
| name: Climate Cool (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Cool Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_cool.yaml" | |
| build_climate_heat_latest: | |
| name: Climate Heat (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Heat Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_heat.yaml" | |
| build_climate_dual_latest: | |
| name: Climate Dual (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Dual Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_dual.yaml" | |
| build_cover_latest: | |
| name: Cover (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Cover Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_cover.yaml" | |
| build_customizations_latest: | |
| name: Customizations (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Customizations Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_heat_customizations.yaml" | |
| build_climate_ble_proxy_latest: | |
| name: Climate Cool + Bluetooth Proxy (latest) | |
| needs: build_core_latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-latest | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Cool + BLE Proxy Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_cool_bluetooth_proxy.yaml" | |
| # =========================================================================== | |
| # ESPHome Dev Chain | |
| # =========================================================================== | |
| build_core_dev: | |
| name: Core (dev) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Cache PlatformIO | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.platformio/packages | |
| ~/.platformio/platforms | |
| key: ${{ runner.os }}-pio-dev-${{ hashFiles('.test/esphome_idf_basic.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pio-dev- | |
| - name: Create virtual environment with ESPHome | |
| run: | | |
| python -m venv ~/venv | |
| ~/venv/bin/pip install --upgrade pip | |
| ~/venv/bin/pip install git+https://github.com/esphome/esphome.git@dev | |
| - name: Verify ESPHome | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome version | |
| - name: Compile Core Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_basic.yaml" | |
| - name: Package environment for artifact | |
| run: tar -czhf esphome-env.tar.gz -C ~ venv .platformio | |
| - name: Upload environment artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| path: esphome-env.tar.gz | |
| retention-days: 1 | |
| build_core_arduino_dev: | |
| name: Core Arduino (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Core Firmware (Arduino) | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_ard_basic.yaml" | |
| build_ble_tracker_dev: | |
| name: BLE Tracker (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile BLE Tracker Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_ble_tracker.yaml" | |
| build_bluetooth_proxy_dev: | |
| name: Bluetooth Proxy (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Bluetooth Proxy Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_bluetooth_proxy.yaml" | |
| build_climate_cool_dev: | |
| name: Climate Cool (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Cool Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_cool.yaml" | |
| build_climate_heat_dev: | |
| name: Climate Heat (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Heat Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_heat.yaml" | |
| build_climate_dual_dev: | |
| name: Climate Dual (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Dual Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_dual.yaml" | |
| build_cover_dev: | |
| name: Cover (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Cover Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_cover.yaml" | |
| build_customizations_dev: | |
| name: Customizations (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Customizations Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_heat_customizations.yaml" | |
| build_climate_ble_proxy_dev: | |
| name: Climate Cool + Bluetooth Proxy (dev) | |
| needs: build_core_dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Download environment artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: esphome-env-dev | |
| - name: Extract environment | |
| run: tar -xzf esphome-env.tar.gz -C ~ | |
| - name: Compile Climate Cool + BLE Proxy Firmware | |
| run: | | |
| source ~/venv/bin/activate | |
| esphome compile ".test/esphome_idf_climate_cool_bluetooth_proxy.yaml" | |
| ... |