Gamify icon indicating copy to clipboard operation
Gamify copied to clipboard

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)

Open divyanshim27 opened this issue 5 months ago • 5 comments

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

divyanshim27 avatar Jun 29 '26 18:06 divyanshim27

Thank you for raising this issue!

We'll review it as soon as possible. We truly appreciate your contributions! ✨

Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊

github-actions[bot] avatar Jun 29 '26 18:06 github-actions[bot]

Hey @DeadIndian , I have deeply gone through the project repo and understood and analysed the project through local running & testing , based on which I found this as major lagging/point of enhancement . Based on my skill-set and problem understanding , I would want to work on the issue and contribute to the repo. Please assign it to me.

divyanshim27 avatar Jun 29 '26 18:06 divyanshim27

I'm interested in working on this issue. Could you please assign this issue to me?

Keshavsspppp avatar Jun 30 '26 17:06 Keshavsspppp

Hi @DeadIndian, I would like to work on this issue under GSSoC'26. I have reviewed the repository structure and understand the proposed CI workflow for the client, server, and Discord bot. I can implement a GitHub Actions pipeline that validates all three services, verifies the backend startup, builds the React frontend, performs syntax checks for the Discord bot, and updates the documentation with the CI status badge. I will ensure the workflow is reliable, follows the project's structure, and does not affect existing functionality. Kindly assign this issue to me. Thank you!

MamidiDhana avatar Jul 02 '26 09:07 MamidiDhana

Hi @DeadIndian ,could you assign this issue to me?

Keshavsspppp avatar Jul 03 '26 22:07 Keshavsspppp