Files
TX-Ultimate-Easy/.github/workflows/validate_esphome_dev.yml
Edward Firmo 6d663323e5 Simplify tests in a matrix
To make it easier to maintain
2025-07-29 10:06:46 +02:00

78 lines
1.6 KiB
YAML

---
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
...