99
1010jobs :
1111 # Validate the component using Home Assistant's official hassfest action
12- validate :
12+ validate-hassfest :
1313 name : Validate with Hassfest
1414 runs-on : ubuntu-latest
1515 steps :
@@ -27,11 +27,33 @@ jobs:
2727 - name : Run Hassfest validation
2828 uses : home-assistant/actions/hassfest@master
2929
30+ # Validate the component using HACS action
31+ validate-hacs :
32+ name : Validate with HACS
33+ runs-on : ubuntu-latest
34+ steps :
35+ - name : Checkout code
36+ uses : actions/checkout@v4
37+
38+ - name : Prepare component structure for HACS validation
39+ run : |
40+ # HACS expects the structure as-is with custom_components/
41+ # Just ensure the structure is correct
42+ echo "Current structure:"
43+ ls -la custom_components/
44+
45+ - name : Run HACS validation
46+ uses : hacs/action@main
47+ with :
48+ category : integration
49+ # Ignore 'brands' check since not all integrations are in home-assistant/brands
50+ ignore : brands
51+
3052 # Test the component with full Home Assistant setup
3153 test :
3254 name : Test Component (Python ${{ matrix.python-version }})
3355 runs-on : ubuntu-latest
34- needs : validate
56+ needs : [ validate-hassfest, validate-hacs]
3557 strategy :
3658 fail-fast : false
3759 matrix :
@@ -123,7 +145,7 @@ jobs:
123145 integration-test :
124146 name : Integration Test - Boot HA
125147 runs-on : ubuntu-latest
126- needs : validate
148+ needs : [ validate-hassfest, validate-hacs]
127149
128150 steps :
129151 - name : Checkout repository
@@ -259,13 +281,17 @@ jobs:
259281 test-summary :
260282 name : Test Summary
261283 runs-on : ubuntu-latest
262- needs : [validate, test, integration-test]
284+ needs : [validate-hassfest, validate-hacs , test, integration-test]
263285 if : always()
264286 steps :
265287 - name : Check test results
266288 run : |
267- if [ "${{ needs.validate.result }}" != "success" ]; then
268- echo "❌ Validation failed"
289+ if [ "${{ needs.validate-hassfest.result }}" != "success" ]; then
290+ echo "❌ Hassfest validation failed"
291+ exit 1
292+ fi
293+ if [ "${{ needs.validate-hacs.result }}" != "success" ]; then
294+ echo "❌ HACS validation failed"
269295 exit 1
270296 fi
271297 if [ "${{ needs.test.result }}" != "success" ]; then
0 commit comments