]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Merged CI into a signle file
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Wed, 7 Jan 2026 17:45:20 +0000 (18:45 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Wed, 7 Jan 2026 17:45:20 +0000 (18:45 +0100)
.github/workflows/ci-validation.yaml [deleted file]
.github/workflows/homeassistant-ci.yaml [new file with mode: 0644]
.github/workflows/yaml-validation.yaml [deleted file]

diff --git a/.github/workflows/ci-validation.yaml b/.github/workflows/ci-validation.yaml
deleted file mode 100644 (file)
index 0376cbd..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-name: Configuration Validation Check
-
-env:
-  VERSION: stable
-
-on:
-  push:
-    branches: [ "master" ]
-  pull_request:
-    branches: [ "master" ]
-
-permissions:
-  contents: read
-
-concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}
-  cancel-in-progress: true
-
-jobs:
-  build:
-    name: Validate Configuration
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: ⤵️ Check out configuration from GitHub
-        uses: actions/checkout@v3
-
-      - name: ⤵️ Check out Custom Components
-        run: |
-          mkdir custom_components/
-          # Monitor Docker
-          git clone https://github.com/ualex73/monitor_docker
-          mv monitor_docker/custom_components/monitor_docker/ custom_components/
-
-      - name: 🔑 Use dummy files as credentials
-        run: |
-          cp .secrets_dummy.yaml secrets.yaml
-          cp credentials/.google_dummy.json credentials/google.json
-
-      - name: ⤵️ Fetch Home Assistant Docker Image
-        run: |
-          docker pull -q "ghcr.io/home-assistant/home-assistant:$VERSION"
-
-      - name: 🚀 Run Home Assistant Configuration Check
-        run: |
-          # Show Version
-          docker run --rm \
-            -v .:/config \
-            "ghcr.io/home-assistant/home-assistant:$VERSION" \
-            python -m homeassistant --version
-
-          # Run check_config
-          docker run --rm \
-            -v .:/config \
-            "ghcr.io/home-assistant/home-assistant:$VERSION" \
-            python -m homeassistant \
-              --config "/config" \
-              --script check_config
diff --git a/.github/workflows/homeassistant-ci.yaml b/.github/workflows/homeassistant-ci.yaml
new file mode 100644 (file)
index 0000000..f1cddc0
--- /dev/null
@@ -0,0 +1,100 @@
+name: Configuration Validation Check
+
+env:
+  VERSION: stable
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+permissions:
+  contents: read
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  build:
+    name: Validate Configuration
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: ⤵️ Check out configuration from GitHub
+        uses: actions/checkout@v3
+
+      # ---------------------------------------------------------
+      # YAML LINT
+      # ---------------------------------------------------------
+      - name: 🧹 YAML Lint
+        run: |
+          pip install yamllint
+          yamllint -c "./.yamllint/rules.yaml" .
+
+      # ---------------------------------------------------------
+      # JSON LINT (per i tuoi mapping JSON)
+      # ---------------------------------------------------------
+      - name: 🔍 JSON Lint
+        run: |
+          sudo npm install -g jsonlint
+          find . -name "*.json" -print0 | xargs -0 -I {} jsonlint -q {}
+
+      # ---------------------------------------------------------
+      # TEMPLATE VALIDATION (light)
+      # ---------------------------------------------------------
+      - name: 🧪 Validate Jinja Templates (light)
+        run: |
+          echo "Checking for malformed Jinja blocks..."
+          grep -R "{{" -n . || true
+
+      # ---------------------------------------------------------
+      # LOVELACE VALIDATION (light)
+      # ---------------------------------------------------------
+      - name: 🖼 Validate Lovelace UI (light)
+        run: |
+          if [ -f ./ui-lovelace.yaml ]; then
+            echo "Lovelace file found, basic validation OK"
+          fi
+
+      # ---------------------------------------------------------
+      # CUSTOM COMPONENTS
+      # ---------------------------------------------------------
+      - name: ⤵️ Check out Custom Components
+        run: |
+          mkdir custom_components/
+          # Monitor Docker
+          git clone https://github.com/ualex73/monitor_docker
+          mv monitor_docker/custom_components/monitor_docker/ custom_components/
+
+      # ---------------------------------------------------------
+      # DUMMY SECRETS
+      # ---------------------------------------------------------
+      - name: 🔑 Use dummy files as credentials
+        run: |
+          cp .secrets_dummy.yaml secrets.yaml
+          cp credentials/.google_dummy.json credentials/google.json
+
+      # ---------------------------------------------------------
+      # HOME ASSISTANT CONFIG CHECK (Docker)
+      # ---------------------------------------------------------
+      - name: ⤵️ Fetch Home Assistant Docker Image
+        run: |
+          docker pull -q "ghcr.io/home-assistant/home-assistant:$VERSION"
+
+      - name: 🚀 Run Home Assistant Configuration Check
+        run: |
+          # Show Version
+          docker run --rm \
+            -v .:/config \
+            "ghcr.io/home-assistant/home-assistant:$VERSION" \
+            python -m homeassistant --version
+
+          # Run check_config
+          docker run --rm \
+            -v .:/config \
+            "ghcr.io/home-assistant/home-assistant:$VERSION" \
+            python -m homeassistant \
+              --config "/config" \
+              --script check_config
diff --git a/.github/workflows/yaml-validation.yaml b/.github/workflows/yaml-validation.yaml
deleted file mode 100644 (file)
index f6bfd44..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-name: YAML Validation Check
-
-on:
-  push:
-    branches: [ "master" ]
-  pull_request:
-    branches: [ "master" ]
-
-permissions:
-  contents: read
-
-concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}
-  cancel-in-progress: true
-
-jobs:
-  code_scan:
-    name: Validate YAML
-    runs-on: "ubuntu-latest"
-
-    steps:
-      - uses: actions/checkout@v3
-      - name: Validate YAML files
-        run: yamllint -c "./.yamllint/rules.yaml" .