-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.yml
121 lines (113 loc) · 2.62 KB
/
config.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: 2
ha-check-config: &ha-check-config
environment:
PYTHONPATH: "/usr/src/app:$PYTHONPATH"
steps:
- checkout
- run:
name: Prepare
command: |
python -m homeassistant --version
cp -R ./.stubs/* ./config
- run:
name: Check config
command: |
python -m homeassistant \
--config ./config/ \
--script check_config \
--info all
jobs:
yamllint:
docker:
- image: sdesbure/yamllint
steps:
- checkout
- run:
name: Check Dependencies
command: |
yamllint --version
- run:
name: Check YAML
command: |
yamllint .
jsonlint:
docker:
- image: sahsu/docker-jsonlint
steps:
- checkout
- run:
name: Check Dependencies
command: |
jsonlint --version || true
- run:
name: Check YAML
command: |
for file in $(find . -type f -name "*.json"); do
if ! jsonlint -q $file; then
export FAILED=1
else
echo "$file OK"
fi
done
if [ "${FAILED}" = "1" ]; then
exit 1
fi
markdownlint:
docker:
- image: pipelinecomponents/remark-lint:latest
steps:
- checkout
- run:
name: Check Markdown
command: |
remark --no-stdout --color --frail .
esphome:
docker:
- image: esphome/esphome:latest
steps:
- checkout
- run:
name: ESPHome Version
command: |
esphome version
- run:
name: Prepare secrets.yaml
command: |
cp -R ./.stubs/* ./config/esphome/
- run:
name: Check ESPHome sketches
command: |
for file in $(find \
./config/esphome \
-type f \
-name "*.yaml"\
-not -name "secrets.yaml"
); do
esphome $file config
done
check-ha-latest:
docker:
- image: homeassistant/home-assistant:latest
<<: *ha-check-config
check-ha-rc:
docker:
- image: homeassistant/home-assistant:rc
<<: *ha-check-config
workflows:
version: 2
validate-and-check-config:
jobs:
- yamllint
- jsonlint
- markdownlint
- esphome
- check-ha-latest:
requires:
- yamllint
- jsonlint
- markdownlint
- check-ha-rc:
requires:
- yamllint
- jsonlint
- markdownlint