Skip to content

feat: add GitHub Actions CI workflow for backend and web β€” there is no automated testing or build validation on PRs, allowing broken TypeScript or failing tests to be mergedΒ #666

Description

@divyanshim27

πŸ› Problem Statement

The DevCard monorepo has a .github/workflows/ directory but no CI workflow that runs on pull requests. This means:

  1. No TypeScript compilation check β€” a PR can introduce type errors in apps/backend/ (Fastify + TypeScript) or apps/web/ (SvelteKit) that only surface when someone pulls and builds locally
  2. No Prisma migration validation β€” a malformed migration file in packages/shared/ or apps/backend/ won't be caught until deployment
  3. No lint enforcement β€” the project has eslint and TypeScript configured but these are never run automatically in CI

With 57 open issues and 29 PRs, this is a real risk to code quality.

Proposed Fix

# .github/workflows/ci.yml
name: CI

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

jobs:
  backend:
    name: Backend β€” TypeCheck & Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
        with: { version: 9 }
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'pnpm' }
      - run: pnpm install --frozen-lockfile
      - name: TypeScript check (backend)
        run: cd apps/backend && pnpm exec tsc --noEmit
      - name: ESLint (backend)
        run: cd apps/backend && pnpm exec eslint src/ --max-warnings 0

  web:
    name: Web β€” Build Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
        with: { version: 9 }
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'pnpm' }
      - run: pnpm install --frozen-lockfile
      - name: SvelteKit build
        run: cd apps/web && pnpm run build

  shared:
    name: Shared Types β€” TypeCheck
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
        with: { version: 9 }
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'pnpm' }
      - run: pnpm install --frozen-lockfile
      - name: TypeScript check (shared)
        run: cd packages/shared && pnpm exec tsc --noEmit

Files to Create

File Purpose
.github/workflows/ci.yml New CI workflow

Suggested labels: enhancement, CI/CD, level: beginner

I would like to work on this. Could you please assign it to me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions