2024-10-18 08:39:03 +00:00
|
|
|
---
|
|
|
|
when:
|
|
|
|
- event: [pull_request, tag]
|
|
|
|
- event: [push, manual]
|
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- &pytest_base
|
2024-10-18 09:58:32 +00:00
|
|
|
depends_on: [yamllint]
|
2024-10-18 08:39:03 +00:00
|
|
|
commands:
|
2024-10-18 09:08:43 +00:00
|
|
|
- |
|
2024-10-18 09:58:32 +00:00
|
|
|
output=$(hass -c . --script check_config 2>&1)
|
2024-10-20 09:25:28 +00:00
|
|
|
filtered_output=$(echo "$output" | grep "ERROR" | grep -v "Unknown device" || true)
|
2024-10-18 09:54:28 +00:00
|
|
|
if [ -n "$filtered_output" ]; then
|
2024-10-18 10:59:34 +00:00
|
|
|
echo "$filtered_output"
|
2024-10-18 09:08:43 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2024-10-18 08:39:03 +00:00
|
|
|
environment:
|
2024-10-18 08:47:12 +00:00
|
|
|
HA_RECORDER_DB_URL: dummy
|
2024-10-18 08:39:03 +00:00
|
|
|
PY_COLORS: "1"
|
|
|
|
|
|
|
|
steps:
|
2024-10-18 09:58:32 +00:00
|
|
|
- name: yamllint
|
|
|
|
image: quay.io/thegeeklab/alpine-tools
|
|
|
|
commands:
|
|
|
|
- yamllint --config-file .yamllint --strict .
|
|
|
|
|
2024-10-18 08:39:03 +00:00
|
|
|
- name: hassio-dev
|
|
|
|
image: ghcr.io/home-assistant/home-assistant:dev
|
|
|
|
<<: *pytest_base
|
|
|
|
|
|
|
|
- name: hassio-latest
|
|
|
|
image: ghcr.io/home-assistant/home-assistant:latest
|
|
|
|
<<: *pytest_base
|