Validate app_config short and long map forms separately

This commit is contained in:
Alexandre
2026-08-04 07:40:19 +02:00
parent 3911ef424e
commit b8a04ed953

View File

@@ -45,36 +45,55 @@ jobs:
- name: Run normalizer unit tests - name: Run normalizer unit tests
run: python3 .github/scripts/test_prepare_addon_lint_config.py run: python3 .github/scripts/test_prepare_addon_lint_config.py
- name: Create current-schema linter fixture - name: Create current-schema linter fixtures
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
mkdir -p .tmp-addon-linter-fixture mkdir -p .tmp-addon-linter-short .tmp-addon-linter-long
cat > .tmp-addon-linter-fixture/config.yaml <<'FIXTURE'
cat > .tmp-addon-linter-short/config.yaml <<'SHORT_FIXTURE'
--- ---
name: App Config Compatibility Fixture name: App Config Short Form Fixture
version: "1.0.0" version: "1.0.0"
slug: app_config_fixture slug: app_config_short_fixture
description: Validates current Home Assistant app configuration map names description: Validates current Home Assistant short-form app map names
arch: arch:
- amd64 - amd64
map: map:
- app_config:rw - app_config:rw
- all_app_configs:ro - all_app_configs:ro
SHORT_FIXTURE
cat > .tmp-addon-linter-long/config.yaml <<'LONG_FIXTURE'
---
name: App Config Long Form Fixture
version: "1.0.0"
slug: app_config_long_fixture
description: Validates current Home Assistant long-form app map names
arch:
- amd64
map:
- type: app_config - type: app_config
read_only: false read_only: false
FIXTURE - type: all_app_configs
read_only: true
LONG_FIXTURE
- name: Verify current map names through upstream linter - name: Verify current short-form map names through upstream linter
uses: ./.github/actions/addon-linter uses: ./.github/actions/addon-linter
with: with:
path: ./.tmp-addon-linter-fixture path: ./.tmp-addon-linter-short
- name: Verify current long-form map names through upstream linter
uses: ./.github/actions/addon-linter
with:
path: ./.tmp-addon-linter-long
- name: Commit compatibility implementation - name: Commit compatibility implementation
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
rm -rf .tmp-addon-linter-fixture .addon-lint rm -rf .tmp-addon-linter-short .tmp-addon-linter-long .addon-lint
rm .github/workflows/agent-support-app-config-linter.yml rm .github/workflows/agent-support-app-config-linter.yml
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"