name: CI on: push: branches: [ main, develop ] pull_request: branches: [ main, develop ] jobs: verify: name: Node ${{ matrix.node-version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: node-version: [20.x, 22.x, 24.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - name: Install dependencies run: npm ci - name: Type Check run: npm run type-check - name: Lint run: npm run lint - name: Test run: npm run test:coverage - name: Build run: npm run build - name: Verify published entry points load run: | node --input-type=module -e "import * as m from './dist/esm/index.js'; if (typeof m.toInstance !== 'function') throw new Error('ESM entry point broken');" node --input-type=commonjs -e "const m = require('./dist/cjs/index.js'); if (typeof m.toInstance !== 'function') throw new Error('CJS entry point broken');" node --input-type=module -e "import { standardDecorators } from './dist/esm/vite.js'; if (standardDecorators().enforce !== 'pre') throw new Error('ESM cereale/vite broken');" node --input-type=commonjs -e "const { standardDecorators } = require('./dist/cjs/vite.js'); if (standardDecorators().enforce !== 'pre') throw new Error('CJS cereale/vite broken');" - name: Run Demo run: npm run demo - name: Published types stand alone run: npm run check:types - name: Landing page loads nothing from the network run: npm run check:docs - name: Landing page bundle is in sync with src/ run: | npm run build:docs git diff --exit-code -- docs/ \ || (echo "docs/ is stale — run 'npm run build:docs' and commit the result" && exit 1)