name: CI

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

jobs:
  ci:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: RouxAntoine/checkout@v3.5.4

      - name: Set up Node.js
        uses: https://github.com/actions/setup-node@v4
        with:
          node-version: "24"
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Security audit
        run: npm audit --production

      - name: Lint
        run: npm run lint

      - name: Type-check
        run: npm run typecheck

      - name: Test
        run: npm run test

      - name: Build
        run: npm run build
