Tests all components #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ESPHome CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| configs: ${{ steps.find.outputs.configs }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: find | |
| run: | | |
| configs=$(find examples tests -type f \( -name '*.yaml' -o -name '*.yml' \) | sort | jq -R -s -c 'split("\n")[:-1]') | |
| echo "configs=$configs" >> "$GITHUB_OUTPUT" | |
| validate: | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: ${{ fromJson(needs.prepare.outputs.configs) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ESPHome setup | |
| uses: ./.github/actions/esphome-setup | |
| with: | |
| create-secrets: "true" | |
| - name: Validate config | |
| run: esphome config "${{ matrix.config }}" | |
| compile: | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: ${{ fromJson(needs.prepare.outputs.configs) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ESPHome setup | |
| uses: ./.github/actions/esphome-setup | |
| with: | |
| create-secrets: "true" | |
| - name: Compile config | |
| run: esphome compile "${{ matrix.config }}" |