Home Assistant CI #1639
This file contains 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: Home Assistant CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: 0 2 * * * | |
env: | |
DEFAULT_PYTHON: "3.12" | |
jobs: | |
# YAML Lint | |
yamllint: | |
name: 🧹 YAML Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⤵️ Check out configuration from GitHub | |
uses: actions/checkout@v4 | |
- name: 🚀 Run yamllint | |
uses: frenck/[email protected] | |
#Remark Lint | |
remarklint: | |
name: 🧹 Remark Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⤵️ Check out configuration from GitHub | |
uses: actions/checkout@v4 | |
- name: Running Remark lint | |
uses: "docker://pipelinecomponents/remark-lint:latest" | |
continue-on-error: true | |
with: | |
args: "remark --no-stdout --color --frail --use preset-lint-recommended ." | |
#Home Assistant - Config check | |
home_assistant: | |
name: 🏠 HA Core / ${{ matrix.version }} Check | |
runs-on: ubuntu-latest | |
needs: [yamllint, remarklint] | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ["stable", "beta", "dev"] | |
steps: | |
- name: ⤵️ Check out configuration from GitHub | |
uses: actions/checkout@v4 | |
- name: ➕ Create dummy files | |
run: | | |
touch ./home-assistant.log | |
- name: 🚀 Run Home Assistant Configuration Check | |
uses: frenck/[email protected] | |
with: | |
secrets: ./.stubs/fake_secrets.yaml | |
version: "${{ matrix.version }}" | |
esphome: | |
name: 🛠️ ESPHome check | |
runs-on: ubuntu-latest | |
needs: [yamllint] | |
steps: | |
- name: ⤵️ Check out configuration from GitHub | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install esphome | |
pip list | |
esphome version | |
- name: Copy stub files into configuration folder | |
run: cp -R ./.stubs/fake_secrets.yaml ./esphome/secrets.yaml | |
- name: Run esphome on all files | |
# yamllint disable rule:line-length | |
run: | | |
for file in $(find ./esphome -type f -name "*.yaml" -not -name "secrets.yaml"); do esphome config "${file}"; done |