# .github/workflows/ci.yml # Continuous Integration Pipeline for D3RO Voice Monorepo name: CI Pipeline on: push: branches: - main - develop - 'feature/**' - 'fix/**' pull_request: branches: - main - develop concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: # ────────────────────────────────────────────────────────────────── # 1. Code Quality, Linting & Typecheck # ────────────────────────────────────────────────────────────────── code-quality: name: Code Quality & Typecheck runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 - name: Setup Node.js 20 LTS uses: actions/setup-node@v4 with: node-version: 20 cache: 'npm' - name: Install Dependencies run: npm ci - name: Lint Check run: npm run lint continue-on-error: true - name: Typecheck All Workspaces run: npm run typecheck # ────────────────────────────────────────────────────────────────── # 2. Automated Test Matrix (Windows / macOS / Ubuntu) # ────────────────────────────────────────────────────────────────── test-matrix: name: Test Suite (${{ matrix.os }}) needs: code-quality strategy: fail-fast: false matrix: os: [windows-latest, macos-latest, ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout Code uses: actions/checkout@v4 - name: Setup Node.js 20 LTS uses: actions/setup-node@v4 with: node-version: 20 cache: 'npm' - name: Install Dependencies run: npm ci - name: Run Monorepo Test Suites (Vitest) run: npm test # ────────────────────────────────────────────────────────────────── # 3. Build Validation for All Workspaces # ────────────────────────────────────────────────────────────────── build-validation: name: Build Validation (${{ matrix.target }}) needs: code-quality strategy: matrix: include: - target: desktop os: windows-latest cmd: npm run build --workspace=@d3ro/desktop - target: admin os: ubuntu-latest cmd: npm run build --workspace=@d3ro/admin runs-on: ${{ matrix.os }} steps: - name: Checkout Code uses: actions/checkout@v4 - name: Setup Node.js 20 LTS uses: actions/setup-node@v4 with: node-version: 20 cache: 'npm' - name: Install Dependencies run: npm ci - name: Build Target Workspace run: ${{ matrix.cmd }}