docs: add v3 banner SVG and update example app versions #37
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| commitlint: | |
| name: Lint Commit Messages | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: wagoid/commitlint-github-action@v6 | |
| with: | |
| configFile: commitlint.config.js | |
| test: | |
| name: Test (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Security checks | |
| run: pnpm security-check | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Build | |
| run: pnpm build | |
| - name: Bundle budget check | |
| run: pnpm size-check | |
| - name: Install docs app dependencies | |
| run: pnpm --dir apps/docs install --frozen-lockfile | |
| - name: Build docs app | |
| run: pnpm docs:build | |
| - name: Check package size | |
| run: | | |
| OUTPUT=$(npm pack --dry-run 2>&1) | |
| echo "$OUTPUT" | |
| # Extract size in kB (handles both "kB" and "MB" units) | |
| SIZE_LINE=$(echo "$OUTPUT" | grep "package size") | |
| SIZE_VAL=$(echo "$SIZE_LINE" | awk '{print $(NF-1)}') | |
| SIZE_UNIT=$(echo "$SIZE_LINE" | awk '{print $NF}') | |
| if [ "$SIZE_UNIT" = "MB" ]; then | |
| SIZE_KB=$(echo "$SIZE_VAL * 1024" | bc -l) | |
| else | |
| SIZE_KB=$SIZE_VAL | |
| fi | |
| # Tarball budget: 2 MB (2048 kB) — includes 27 subpaths + source maps | |
| if [ -n "$SIZE_KB" ] && (( $(echo "$SIZE_KB > 2048" | bc -l 2>/dev/null || echo 0) )); then | |
| echo "Package size (${SIZE_VAL} ${SIZE_UNIT}) exceeds 2 MB limit" | |
| exit 1 | |
| fi | |
| echo "Package size (${SIZE_VAL} ${SIZE_UNIT}) is within limits" |