From f9da91277745653b4c5ffd10a92d43fde545fe11 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Tue, 29 Jul 2025 10:13:18 +0200 Subject: [PATCH] Test Media player under IDF and unify ESPHome tests --- .github/workflows/validate_esphome.yml | 180 ++--------------- .github/workflows/validate_esphome_beta.yml | 210 -------------------- .github/workflows/validate_esphome_dev.yml | 77 ------- .test/esphome_idf_media_player.yaml | 8 + 4 files changed, 26 insertions(+), 449 deletions(-) delete mode 100644 .github/workflows/validate_esphome_beta.yml delete mode 100644 .github/workflows/validate_esphome_dev.yml create mode 100644 .test/esphome_idf_media_player.yaml diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index 444fa08..680bef6 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -1,5 +1,5 @@ --- -name: Validate ESPHome (Latest) +name: Validate ESPHome permissions: contents: read @@ -15,178 +15,34 @@ concurrency: jobs: code_scan: name: Code scan (YAML) - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@main - + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: - python-version: '3.8' - + python-version: '3.11' - name: Install Yamllint run: pip install yamllint - - name: Validate YAML files run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} + - build_ard_core: - name: Core (Arduino) + build: + name: ${{ matrix.target }} (${{ matrix.framework }}) - ${{ matrix.version }} needs: code_scan runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + framework: [ard, idf] + version: [latest, beta, dev] + target: [core, basic, hw_relays, hw_speaker, hw_vibration, ble_proxy, media_player] steps: - - uses: actions/checkout@main - - name: Build Core (Arduino) - uses: esphome/build-action@main + - uses: actions/checkout@v4 + - name: Build ${{ matrix.target }} (${{ matrix.framework }}) - ${{ matrix.version }} + uses: esphome/build-action@v4 with: - yaml-file: ".test/esphome_ard_core.yaml" - version: latest - - build_idf_core: - name: Core (IDF) - needs: code_scan - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Core (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_core.yaml" - version: latest - - build_ard_basic: - name: Basic (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Basic (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_basic.yaml" - version: latest - - build_idf_basic: - name: Basic (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Basic (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_basic.yaml" - version: latest - - build_ard_hw_relays: - name: HW Relays (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Relays (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_hw_relays.yaml" - version: latest - - build_idf_hw_relays: - name: HW Relays (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Relays (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_hw_relays.yaml" - version: latest - - build_ard_hw_speaker: - name: HW Speaker (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Speaker (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_hw_speaker.yaml" - version: latest - - build_idf_hw_speaker: - name: HW Speaker (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Speaker (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_hw_speaker.yaml" - version: latest - - build_ard_hw_vibration: - name: HW Vibration (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Vibration (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_hw_vibration.yaml" - version: latest - - build_idf_hw_vibration: - name: HW Vibration (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Vibration (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_hw_vibration.yaml" - version: latest - - build_ard_ble_proxy: - name: Bluetooth Proxy (Ard) - needs: build_ard_basic - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build BLE Proxy (Ard) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_ble_proxy.yaml" - version: latest - - build_idf_ble_proxy: - name: Bluetooth Proxy (IDF) - needs: build_idf_basic - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build BLE Proxy (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_ble_proxy.yaml" - version: latest - - build_ard_media_player: - name: Media Player (Ard) - needs: - - build_ard_basic - - build_ard_hw_relays - - build_ard_hw_vibration - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Media Player (Ard) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_media_player.yaml" - version: latest + yaml-file: ".test/esphome_${{ matrix.framework }}_${{ matrix.target }}.yaml" + version: ${{ matrix.version }} ... diff --git a/.github/workflows/validate_esphome_beta.yml b/.github/workflows/validate_esphome_beta.yml deleted file mode 100644 index 970b307..0000000 --- a/.github/workflows/validate_esphome_beta.yml +++ /dev/null @@ -1,210 +0,0 @@ ---- -name: Validate ESPHome (Beta) - -permissions: - contents: read - pull-requests: read - -on: # yamllint disable-line rule:truthy - push: - paths: - - "**/*.yml" - - "**/*.yaml" - - "**/*.h" - - "**/*.cpp" - - "**/*.c" - - "**/*.py" - - pull_request: - paths: - - "**/*.yml" - - "**/*.yaml" - - "**/*.h" - - "**/*.cpp" - - "**/*.c" - - "**/*.py" - - 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 Code - uses: actions/checkout@main - - - name: Setup Python - uses: actions/setup-python@main - with: - python-version: '3.8' - - - name: Install Yamllint - run: pip install yamllint - - - name: Validate YAML files - run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} + - - build_ard_core: - name: Core (Arduino) - needs: code_scan - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Core (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_core.yaml" - version: beta - - build_idf_core: - name: Core (IDF) - needs: code_scan - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Core (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_core.yaml" - version: beta - - build_ard_basic: - name: Basic (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Basic (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_basic.yaml" - version: beta - - build_idf_basic: - name: Basic (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Basic (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_basic.yaml" - version: beta - - build_ard_hw_relays: - name: HW Relays (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Relays (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_hw_relays.yaml" - version: beta - - build_idf_hw_relays: - name: HW Relays (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Relays (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_hw_relays.yaml" - version: beta - - build_ard_hw_speaker: - name: HW Speaker (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Speaker (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_hw_speaker.yaml" - version: beta - - build_idf_hw_speaker: - name: HW Speaker (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Speaker (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_hw_speaker.yaml" - version: beta - - build_ard_hw_vibration: - name: HW Vibration (Arduino) - needs: build_ard_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Vibration (Arduino) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_hw_vibration.yaml" - version: beta - - build_idf_hw_vibration: - name: HW Vibration (IDF) - needs: build_idf_core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build HW Vibration (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_hw_vibration.yaml" - version: beta - - build_ard_ble_proxy: - name: Bluetooth Proxy (Ard) - needs: build_ard_basic - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build BLE Proxy (Ard) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_ble_proxy.yaml" - version: beta - - build_idf_ble_proxy: - name: Bluetooth Proxy (IDF) - needs: build_idf_basic - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build BLE Proxy (IDF) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_idf_ble_proxy.yaml" - version: beta - - build_ard_media_player: - name: Media Player (Ard) - needs: - - build_ard_basic - - build_ard_hw_relays - - build_ard_hw_vibration - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Build Media Player (Ard) - uses: esphome/build-action@main - with: - yaml-file: ".test/esphome_ard_media_player.yaml" - version: beta -... diff --git a/.github/workflows/validate_esphome_dev.yml b/.github/workflows/validate_esphome_dev.yml deleted file mode 100644 index bd527d5..0000000 --- a/.github/workflows/validate_esphome_dev.yml +++ /dev/null @@ -1,77 +0,0 @@ ---- -name: Validate ESPHome (Dev) - -permissions: - contents: read - pull-requests: read - -on: # yamllint disable-line rule:truthy - push: - paths: - - "**/*.yml" - - "**/*.yaml" - - "**/*.h" - - "**/*.cpp" - - "**/*.c" - - "**/*.py" - - pull_request: - paths: - - "**/*.yml" - - "**/*.yaml" - - "**/*.h" - - "**/*.cpp" - - "**/*.c" - - "**/*.py" - - 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 Code - uses: actions/checkout@main - - - name: Setup Python - uses: actions/setup-python@main - with: - python-version: '3.8' - - - name: Install Yamllint - run: pip install yamllint - - - name: Validate YAML files - run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} + - - build: - needs: code_scan - runs-on: ubuntu-latest - strategy: - matrix: - framework: [arduino, idf] - target: - - core - - basic - - hw_relays - - hw_speaker - - hw_vibration - include: - - framework: arduino - target: ble_proxy - - framework: idf - target: ble_proxy - - framework: arduino - target: media_player - steps: - - uses: actions/checkout@v4 - - uses: esphome/build-action@vX - with: - yaml-file: ".test/esphome_${{ matrix.framework }}_${{ matrix.target }}.yaml" - version: dev -... diff --git a/.test/esphome_idf_media_player.yaml b/.test/esphome_idf_media_player.yaml new file mode 100644 index 0000000..b554651 --- /dev/null +++ b/.test/esphome_idf_media_player.yaml @@ -0,0 +1,8 @@ +--- +packages: + common_idf: !include common_idf.yaml + core_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml + standard_hw_relays_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_standard_hw_relays.yaml + standard_hw_vibration_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_standard_hw_vibration.yaml + addon_media_player: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_addon_media_player.yaml +...