github action esphome build validation

This commit is contained in:
Brian Hanifin
2021-02-27 09:39:55 -08:00
parent 5d672656a2
commit 86770d0f28
5 changed files with 78 additions and 10 deletions
+30
View File
@@ -0,0 +1,30 @@
---
## Source: https://github.com/frenck/home-assistant-config/tree/master/.github/workflows
name: build
# yamllint disable-line rule:truthy
on:
push:
jobs:
esphome:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out configuration from GitHub
uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install esphome
pip list
esphome version
- name: Copy secrets file into configuration folder
run: cp ./secrets.yaml ./config/esphome/
- name: Run esphome on all files
# yamllint disable rule:line-length
run: |
for file in $(find ./config/esphome -type f -name "*.yaml" -not -name "secrets.yaml"); do esphome "${file}" config; done
+18 -8
View File
@@ -1,11 +1,21 @@
# Ignore all subfolders.
**/
# Extension ignores
*.ini
# Ignore project folders
.esphome/
3rd_party/
bluetooth_hub/
irrigation/
plug*/
pool/
shelly*/
sonoff*/
# Ignore subfolders.
**/lib
**/src
# Specific file ignores.
secrets.yaml
.DS_Store
._*
# Specific folders to include.
!common
!common/**
.DS_Store
secrets.yaml
+20
View File
@@ -0,0 +1,20 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
+9 -1
View File
@@ -7,5 +7,13 @@
"pioenvs",
"sonoff",
"tuya"
]
],
"files.exclude": {
"**/*.ini": true,
"**/lib": true,
"**/src": true,
"**/._*": true,
"**/.DS_Store": true,
"**/secrets.yaml": true
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
substitutions:
project: Upstairs Bathroom Exhaust
id: shelly1_02
humidity_difference_threshold: "7.5" # Difference between house humidity and bathroom humidity.
humidity_difference_threshold: "12.5" # Difference between house humidity and bathroom humidity.
countdown_duration: "600" # 600 seconds = 10 minutes
<<: !include common/substitutions/gpio/shelly1.yaml