|
| 1 | +--- |
| 2 | +name: Validate ESPHome (Dev) |
| 3 | + |
| 4 | +permissions: |
| 5 | + contents: read |
| 6 | + pull-requests: read |
| 7 | + |
| 8 | +on: # yamllint disable-line rule:truthy |
| 9 | + push: |
| 10 | + paths: |
| 11 | + - "**/*.yml" |
| 12 | + - "**/*.yaml" |
| 13 | + - "**/*.h" |
| 14 | + - "**/*.cpp" |
| 15 | + - "**/*.c" |
| 16 | + - "**/*.py" |
| 17 | + |
| 18 | + pull_request: |
| 19 | + paths: |
| 20 | + - "**/*.yml" |
| 21 | + - "**/*.yaml" |
| 22 | + - "**/*.h" |
| 23 | + - "**/*.cpp" |
| 24 | + - "**/*.c" |
| 25 | + - "**/*.py" |
| 26 | + |
| 27 | + workflow_dispatch: |
| 28 | + |
| 29 | +concurrency: |
| 30 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 31 | + cancel-in-progress: true |
| 32 | + |
| 33 | +jobs: |
| 34 | + code_scan: |
| 35 | + name: Code scan (YAML) |
| 36 | + runs-on: "ubuntu-latest" |
| 37 | + steps: |
| 38 | + - name: Checkout Code |
| 39 | + uses: actions/checkout@main |
| 40 | + |
| 41 | + - name: Setup Python |
| 42 | + uses: actions/setup-python@main |
| 43 | + with: |
| 44 | + python-version: '3.8' |
| 45 | + |
| 46 | + - name: Install Yamllint |
| 47 | + run: pip install yamllint |
| 48 | + |
| 49 | + - name: Validate YAML files |
| 50 | + run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} + |
| 51 | + |
| 52 | + build_ard_core: |
| 53 | + name: Core (Arduino) |
| 54 | + needs: code_scan |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@main |
| 58 | + - name: Build Core (Arduino) |
| 59 | + uses: esphome/build-action@main |
| 60 | + with: |
| 61 | + yaml-file: ".test/esphome_ard_core.yaml" |
| 62 | + version: dev |
| 63 | + |
| 64 | + build_idf_core: |
| 65 | + name: Core (IDF) |
| 66 | + needs: code_scan |
| 67 | + runs-on: ubuntu-latest |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@main |
| 70 | + - name: Build Core (IDF) |
| 71 | + uses: esphome/build-action@main |
| 72 | + with: |
| 73 | + yaml-file: ".test/esphome_idf_core.yaml" |
| 74 | + version: dev |
| 75 | + |
| 76 | + build_ard_basic: |
| 77 | + name: Basic (Arduino) |
| 78 | + needs: build_ard_core |
| 79 | + runs-on: ubuntu-latest |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@main |
| 82 | + - name: Build Basic (Arduino) |
| 83 | + uses: esphome/build-action@main |
| 84 | + with: |
| 85 | + yaml-file: ".test/esphome_ard_basic.yaml" |
| 86 | + version: dev |
| 87 | + |
| 88 | + build_idf_basic: |
| 89 | + name: Basic (IDF) |
| 90 | + needs: build_idf_core |
| 91 | + runs-on: ubuntu-latest |
| 92 | + steps: |
| 93 | + - uses: actions/checkout@main |
| 94 | + - name: Build Basic (IDF) |
| 95 | + uses: esphome/build-action@main |
| 96 | + with: |
| 97 | + yaml-file: ".test/esphome_idf_basic.yaml" |
| 98 | + version: dev |
| 99 | + |
| 100 | + build_ard_hw_relays: |
| 101 | + name: HW Relays (Arduino) |
| 102 | + needs: build_ard_core |
| 103 | + runs-on: ubuntu-latest |
| 104 | + steps: |
| 105 | + - uses: actions/checkout@main |
| 106 | + - name: Build HW Relays (Arduino) |
| 107 | + uses: esphome/build-action@main |
| 108 | + with: |
| 109 | + yaml-file: ".test/esphome_ard_hw_relays.yaml" |
| 110 | + version: dev |
| 111 | + |
| 112 | + build_idf_hw_relays: |
| 113 | + name: HW Relays (IDF) |
| 114 | + needs: build_idf_core |
| 115 | + runs-on: ubuntu-latest |
| 116 | + steps: |
| 117 | + - uses: actions/checkout@main |
| 118 | + - name: Build HW Relays (IDF) |
| 119 | + uses: esphome/build-action@main |
| 120 | + with: |
| 121 | + yaml-file: ".test/esphome_idf_hw_relays.yaml" |
| 122 | + version: dev |
| 123 | + |
| 124 | + build_ard_hw_speaker: |
| 125 | + name: HW Speaker (Arduino) |
| 126 | + needs: build_ard_core |
| 127 | + runs-on: ubuntu-latest |
| 128 | + steps: |
| 129 | + - uses: actions/checkout@main |
| 130 | + - name: Build HW Speaker (Arduino) |
| 131 | + uses: esphome/build-action@main |
| 132 | + with: |
| 133 | + yaml-file: ".test/esphome_ard_hw_speaker.yaml" |
| 134 | + version: dev |
| 135 | + |
| 136 | + build_idf_hw_speaker: |
| 137 | + name: HW Speaker (IDF) |
| 138 | + needs: build_idf_core |
| 139 | + runs-on: ubuntu-latest |
| 140 | + steps: |
| 141 | + - uses: actions/checkout@main |
| 142 | + - name: Build HW Speaker (IDF) |
| 143 | + uses: esphome/build-action@main |
| 144 | + with: |
| 145 | + yaml-file: ".test/esphome_idf_hw_speaker.yaml" |
| 146 | + version: dev |
| 147 | + |
| 148 | + build_ard_hw_vibration: |
| 149 | + name: HW Vibration (Arduino) |
| 150 | + needs: build_ard_core |
| 151 | + runs-on: ubuntu-latest |
| 152 | + steps: |
| 153 | + - uses: actions/checkout@main |
| 154 | + - name: Build HW Vibration (Arduino) |
| 155 | + uses: esphome/build-action@main |
| 156 | + with: |
| 157 | + yaml-file: ".test/esphome_ard_hw_vibration.yaml" |
| 158 | + version: dev |
| 159 | + |
| 160 | + build_idf_hw_vibration: |
| 161 | + name: HW Vibration (IDF) |
| 162 | + needs: build_idf_core |
| 163 | + runs-on: ubuntu-latest |
| 164 | + steps: |
| 165 | + - uses: actions/checkout@main |
| 166 | + - name: Build HW Vibration (IDF) |
| 167 | + uses: esphome/build-action@main |
| 168 | + with: |
| 169 | + yaml-file: ".test/esphome_idf_hw_vibration.yaml" |
| 170 | + version: dev |
| 171 | + |
| 172 | + build_ard_ble_proxy: |
| 173 | + name: Bluetooth Proxy (Ard) |
| 174 | + needs: build_ard_basic |
| 175 | + runs-on: ubuntu-latest |
| 176 | + steps: |
| 177 | + - uses: actions/checkout@main |
| 178 | + - name: Build BLE Proxy (Ard) |
| 179 | + uses: esphome/build-action@main |
| 180 | + with: |
| 181 | + yaml-file: ".test/esphome_ard_ble_proxy.yaml" |
| 182 | + version: dev |
| 183 | + |
| 184 | + build_idf_ble_proxy: |
| 185 | + name: Bluetooth Proxy (IDF) |
| 186 | + needs: build_idf_basic |
| 187 | + runs-on: ubuntu-latest |
| 188 | + steps: |
| 189 | + - uses: actions/checkout@main |
| 190 | + - name: Build BLE Proxy (IDF) |
| 191 | + uses: esphome/build-action@main |
| 192 | + with: |
| 193 | + yaml-file: ".test/esphome_idf_ble_proxy.yaml" |
| 194 | + version: dev |
| 195 | + |
| 196 | + build_ard_media_player: |
| 197 | + name: Media Player (Ard) |
| 198 | + needs: |
| 199 | + - build_ard_basic |
| 200 | + - build_ard_hw_relays |
| 201 | + - build_ard_hw_vibration |
| 202 | + runs-on: ubuntu-latest |
| 203 | + steps: |
| 204 | + - uses: actions/checkout@main |
| 205 | + - name: Build Media Player (Ard) |
| 206 | + uses: esphome/build-action@main |
| 207 | + with: |
| 208 | + yaml-file: ".test/esphome_ard_media_player.yaml" |
| 209 | + version: dev |
| 210 | +... |
0 commit comments