Boots HA 2026.8.3 against the repo config with CI-only stub secrets; catches bad Jinja/unknown keys/schema drift yamllint cannot see. Meat: https://projects.knownelement.com/issues/778
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
# pfv-bms CI [#784 #778] — fleet standard per Discourse "CI/CD: Gitea Actions".
|
|
# Runs on dev (pre-release gate) and release (final gate before live pull).
|
|
name: ci
|
|
on:
|
|
push:
|
|
branches: [dev, release]
|
|
jobs:
|
|
lint:
|
|
runs-on: ultix
|
|
container:
|
|
image: node:20-bookworm
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: yamllint
|
|
run: |
|
|
apt-get update -qq >/dev/null && apt-get install -qq -y python3-pip >/dev/null && pip install --quiet --break-system-packages yamllint
|
|
yamllint -c .yamllint .
|
|
- name: secret scan
|
|
run: |
|
|
if grep -rInE "BEGIN (RSA |OPENSSH |EC |DSA )?PRIVATE KEY|aws_secret_access_key *=|AKIA[0-9A-Z]{16}" --exclude-dir=.git .; then
|
|
echo "::error::secret material committed"; exit 1
|
|
else
|
|
echo "secret scan clean"
|
|
fi
|
|
- name: sdlc regression tests
|
|
run: |
|
|
chmod +x tests/test_sdlc.sh
|
|
bash tests/test_sdlc.sh
|
|
|
|
# Real load validation: boots Home Assistant against the repo config and
|
|
# proves HA can parse + set up every integration (yamllint only proves the
|
|
# YAML parses; this catches unknown keys, bad Jinja, schema drift).
|
|
# Pinned to the version the box runs. Stub secrets are CI-only fixtures
|
|
# (tests/fixtures/secrets-stub.yaml) — never present on the live box.
|
|
config-check:
|
|
runs-on: ultix
|
|
container:
|
|
image: homeassistant/home-assistant:2026.8.3
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: homeassistant check_config
|
|
run: |
|
|
cp tests/fixtures/secrets-stub.yaml secrets.yaml
|
|
python3 -m homeassistant --script check_config --config .
|
|
rc=$?
|
|
rm -f secrets.yaml home-assistant_v2.db home-assistant.log*
|
|
exit $rc
|