-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (39 loc) · 1.56 KB
/
examples.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Build component for different platforms
name: build examples
on:
push:
branches-ignore: [ "doc_test" ]
pull_request:
branches: [ "master", "dev" , "experimental" ]
jobs:
examples_test:
name: Building ${{ matrix.file.main }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file:
- {main: max-hon.yaml, additional: "docs/examples/.base.yaml "}
- {main: max-smartair2.yaml, additional: "docs/examples/.base.yaml"}
- {main: min-hon.yaml, additional: "docs/examples/.base.yaml"}
- {main: min-smartair2.yaml, additional: "docs/examples/.base.yaml"}
- {main: esphome_climate_example.yaml, additional: "docs/examples/.base.yaml docs/examples/.uart.yaml"}
- {main: usb_s3.yaml, additional: ""}
- {main: usb_c3u.yaml, additional: ""}
- {main: usb_c6.yaml, additional: ""}
- {main: uart_sniffer.yaml, additional: ""}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install esphome
run: pip3 install -U esphome
- name: Version esphome
run: esphome version
- name: Prepering test file
run: cat ${{ matrix.file.additional }} docs/examples/${{ matrix.file.main }} > ./docs/examples/__test__.yaml
- name: Preparing secrets.yaml
run: |
echo "wifi_ssid: test_ssid" > ./docs/examples/secrets.yaml
echo "wifi_password: test_pass" >> ./docs/examples/secrets.yaml
- name: Build ESPHome config
run: esphome compile ./docs/examples/__test__.yaml