ha-inlite

Home Assistant integration for in-lite
git clone https://git.stephank.nl/ha-inlite
Log | Files | Refs | README | LICENSE | ZIP

squad-preview.yml (1812B)


      1 name: Squad Preview Validation
      2 
      3 on:
      4   push:
      5     branches: [preview]
      6 
      7 permissions:
      8   contents: read
      9 
     10 jobs:
     11   validate:
     12     runs-on: ubuntu-latest
     13     steps:
     14       - uses: actions/checkout@v4
     15 
     16       - uses: actions/setup-node@v4
     17         with:
     18           node-version: 22
     19 
     20       - name: Validate version consistency
     21         run: |
     22           VERSION=$(node -e "console.log(require('./package.json').version)")
     23           if ! grep -q "## \[$VERSION\]" CHANGELOG.md 2>/dev/null; then
     24             echo "::error::Version $VERSION not found in CHANGELOG.md — update CHANGELOG.md before release"
     25             exit 1
     26           fi
     27           echo "✅ Version $VERSION validated in CHANGELOG.md"
     28 
     29       - name: Run tests
     30         run: node --test test/*.test.js
     31 
     32       - name: Check no .ai-team/ or .squad/ files are tracked
     33         run: |
     34           FOUND_FORBIDDEN=0
     35           if git ls-files --error-unmatch .ai-team/ 2>/dev/null; then
     36             echo "::error::❌ .ai-team/ files are tracked on preview — this must not ship."
     37             FOUND_FORBIDDEN=1
     38           fi
     39           if git ls-files --error-unmatch .squad/ 2>/dev/null; then
     40             echo "::error::❌ .squad/ files are tracked on preview — this must not ship."
     41             FOUND_FORBIDDEN=1
     42           fi
     43           if [ $FOUND_FORBIDDEN -eq 1 ]; then
     44             exit 1
     45           fi
     46           echo "✅ No .ai-team/ or .squad/ files tracked — clean for release."
     47 
     48       - name: Validate package.json version
     49         run: |
     50           VERSION=$(node -e "console.log(require('./package.json').version)")
     51           if [ -z "$VERSION" ]; then
     52             echo "::error::❌ No version field found in package.json."
     53             exit 1
     54           fi
     55           echo "✅ package.json version: $VERSION"