name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: local-ubuntu-latest timeout-minutes: 10 steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' cache-dependency-path: headlamp-sealed-secrets/package-lock.json - name: Install dependencies working-directory: ./headlamp-sealed-secrets run: npm ci - name: Run type check working-directory: ./headlamp-sealed-secrets run: npm run tsc - name: Run linter working-directory: ./headlamp-sealed-secrets run: npm run lint - name: Build plugin working-directory: ./headlamp-sealed-secrets run: npm run build - name: Verify build artifacts working-directory: ./headlamp-sealed-secrets run: | if [ ! -d "dist" ] || [ -z "$(ls -A dist)" ]; then echo "Error: dist directory is empty or missing" exit 1 fi echo "Build artifacts verified successfully" ls -lh dist/ - name: Upload build artifact (for inspection) uses: actions/upload-artifact@v4 if: always() with: name: plugin-dist path: headlamp-sealed-secrets/dist/ retention-days: 7