Files
TX-Ultimate-Easy/.github/workflows/validate_esphome.yml
2025-07-29 10:22:11 +02:00

67 lines
1.6 KiB
YAML

---
name: Validate ESPHome
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.11'
- name: Install Yamllint
run: pip install yamllint
- name: Validate YAML files
run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} +
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 ${{ matrix.target }} (${{ matrix.framework }}) - ${{ matrix.version }}
uses: esphome/build-action@main
with:
yaml-file: ".test/esphome_${{ matrix.framework }}_${{ matrix.target }}.yaml"
version: ${{ matrix.version }}
...