--- name: Validate and Build ESPHome # yamllint disable-line rule:truthy on: push: paths: - "*.yaml" - "prebuilt/*.yaml" - ".test/*.yaml" - "*.h" - "*.c" - "*.cpp" - "*.py" pull_request: paths: - "*.yaml" - "prebuilt/*.yaml" - ".test/*.yaml" - "*.h" - "*.c" - "*.cpp" - "*.py" workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: setup_dependencies: name: Setup & Cache Dependencies runs-on: ubuntu-latest outputs: cache-hit-arduino: ${{ steps.cache-arduino.outputs.cache-hit }} steps: - name: Checkout repository uses: actions/checkout@main - name: Cache Arduino Dependencies id: cache-arduino uses: actions/cache@main with: path: | ~/.esphome/cache ~/.platformio/packages ~/.platformio/platforms key: ${{ runner.os }}-arduino-${{ hashFiles('**/esphome_ard_basic.yaml') }} restore-keys: | ${{ runner.os }}-arduino- code_scan: name: Code scan (YAML) runs-on: "ubuntu-latest" needs: setup_dependencies 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_basic: name: Basic needs: - code_scan runs-on: ubuntu-latest steps: - uses: actions/checkout@main - name: Build core uses: esphome/build-action@v2.0.0 with: yaml_file: ".test/esphome_ard_basic.yaml" build_bluetooth_proxy_4: name: Bluetooth Proxy (IDF v4) needs: build_basic runs-on: ubuntu-latest steps: - uses: actions/checkout@main - name: Build core uses: esphome/build-action@v2.0.0 with: yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml" build_bluetooth_proxy_5: name: Bluetooth Proxy (IDF v5) needs: build_basic runs-on: ubuntu-latest steps: - uses: actions/checkout@main - name: Build core uses: esphome/build-action@v2.0.0 with: yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml" ...