Update README.md #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI — Build Check | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| jobs: | |
| build: | |
| name: Node.js Build & Syntax Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| # ── 1. Checkout ────────────────────────────────────────────────────── | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # ── 2. Setup Node.js 24.x (matches local runtime 24.11.1) ──────────── | |
| - name: Set up Node.js 24.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24.x" | |
| # ── 3. Install dependencies ─────────────────────────────────────────── | |
| # npm install is used instead of npm ci because package-lock.json | |
| # is not committed to the repo (it is gitignored). | |
| - name: Install dependencies | |
| run: npm install | |
| # ── 4. Syntax / parse check on all entrypoints ──────────────────────── | |
| # node --check validates ES module syntax without executing the file. | |
| # This catches import errors, syntax mistakes, and broken destructures | |
| # without needing a running WhatsApp session or MongoDB connection. | |
| - name: Syntax check — index.js | |
| run: node --check index.js | |
| - name: Syntax check — Configurations.js | |
| run: node --check Configurations.js | |
| - name: Syntax check — Core.js | |
| run: node --check Core.js | |
| - name: Syntax check — System/MongoAuth/MongoAuth.js | |
| run: node --check System/MongoAuth/MongoAuth.js | |
| # ── 5. Bulk syntax check all Plugins ────────────────────────────────── | |
| - name: Syntax check — all Plugins | |
| run: | | |
| find Plugins -name "*.js" | while read f; do | |
| echo " checking $f" | |
| node --check "$f" || exit 1 | |
| done | |
| # ── 6. Bulk syntax check all System files ───────────────────────────── | |
| - name: Syntax check — all System files | |
| run: | | |
| find System -name "*.js" | while read f; do | |
| echo " checking $f" | |
| node --check "$f" || exit 1 | |
| done |