mirror of
https://github.com/alexhopeoconnor/arduino-home-assistant.git
synced 2026-10-04 02:48:13 +10:00
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: Home Assistant MQTT test harness
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "17 3 * * 1"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test_harness:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- home_assistant: "2024.11.3"
|
|
expect_disabled_cleanup: "0"
|
|
- home_assistant: stable
|
|
expect_disabled_cleanup: "0"
|
|
- home_assistant: dev
|
|
expect_disabled_cleanup: "1"
|
|
env:
|
|
HA_VERSION: ${{ matrix.home_assistant }}
|
|
TEST_HARNESS_EXPECT_DISABLED_CLEANUP: ${{ matrix.expect_disabled_cleanup }}
|
|
COMPOSE_FILE: tests/ha-test-harness/compose.yaml
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Start broker and Home Assistant
|
|
run: docker compose up -d mqtt homeassistant
|
|
- name: Check single-to-device migration
|
|
run: docker compose run --rm tests
|
|
- name: Restart Home Assistant from retained data
|
|
run: docker compose restart homeassistant
|
|
- name: Check retained discovery after restart
|
|
run: docker compose run --rm -e TEST_HARNESS_MODE=retained-restart tests
|
|
- name: Collect Home Assistant logs on failure
|
|
if: failure()
|
|
run: docker compose logs --no-color homeassistant mqtt
|
|
- name: Remove test harness volumes
|
|
if: always()
|
|
run: docker compose down -v
|