Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.
This repository was archived by the owner on Jul 11, 2026. It is now read-only.

feat: add GitHub Actions CI pipeline — no automated testing, lint, or Discord bot connectivity check runs on any PR despite 50 active forks and a 3-service monorepo (client/server/bot) #261

Description

@divyanshim27

Summary

Gamify is a 3-service monorepo (React client, Express server, Discord.js
bot). With 50 active forks and 56 open issues, every PR is merged with
zero automated verification. There is no .github/workflows/ CI file.

What This Allows to Merge Undetected

  • JavaScript syntax errors in bot/index.js that crash the Discord bot
  • Express route regressions in server/routes/ that break point awarding
  • React build failures in client/src/ from JSX import errors
  • Missing server/.env.example entries when new features add new env vars

Proposed Workflow

Create .github/workflows/ci.yml:

name: CI

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

jobs:
  server:
    name: "Backend — Lint + Start"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: "npm"
          cache-dependency-path: server/package-lock.json

      - name: Install server dependencies
        working-directory: server
        run: npm install

      - name: Verify server starts cleanly
        working-directory: server
        env:
          PORT: 5000
          MONGO_URI: "mongodb://localhost:27017/gamify_ci"
          JWT_SECRET: "ci-test-secret-not-for-production"
        run: |
          timeout 10 node server.js &
          sleep 5
          curl -f http://localhost:5000/health || echo "No /health route — add one"

  client:
    name: "Frontend — Build"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: "npm"
          cache-dependency-path: client/package-lock.json

      - name: Install client dependencies
        working-directory: client
        run: npm install

      - name: Build React app
        working-directory: client
        env:
          VITE_API_URL: "http://localhost:5000"
        run: npm run build

  bot:
    name: "Discord Bot — Syntax Check"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: "npm"
          cache-dependency-path: bot/package-lock.json

      - name: Install bot dependencies
        working-directory: bot
        run: npm install

      - name: Verify bot syntax (no token required)
        working-directory: bot
        run: node --check index.js

Acceptance Criteria

  • .github/workflows/ci.yml created and green on main
  • Server, client, and bot verified in parallel jobs
  • GET /health endpoint added to Express server for CI verification
  • README updated with CI status badge

Labels: enhancement, ci/cd, infrastructure, level: intermediate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions