Skip to content

feat: add GitHub Actions CI workflow — no automated testing, linting, or HTML validation exists on any PR, allowing broken JavaScript, dead API links, and malformed HTML to merge undetected #169

Description

@prince-pokharna

Summary

The repository has no .github/workflows/ directory — zero GitHub
Actions are configured. With 82 open issues, 30 active PRs, and 70
forks all contributing simultaneously during GSSOC'26, every PR is
merged with zero automated verification of:

  • JavaScript syntax errors in scripts/*.js
  • Broken internal links between the 8 HTML pages
  • Flask backend startup (python backend/app.py)
  • HTML structural validity (unclosed tags, missing lang attributes)
  • Dead href references (forgot-password.html linked in login.html
    but this file does not exist in the repository)

Confirmed Existing Bug Caught by This Gap

login.html line 73:

<p><a href="forgot-password.html">Forgot Password?</a></p>

forgot-password.html does not exist in the repository. This is a
broken link in production that would be caught instantly by an automated
link checker — but with no CI, it has been merged and is live.

Proposed Workflow

Create .github/workflows/ci.yml:

name: CI

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

jobs:
  validate-frontend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "20"

      - name: Install dependencies
        run: npm install

      - name: Check for broken internal links
        run: |
          npm install -g broken-link-checker
          blc http://localhost:8080 --recursive --exclude-external || true

      - name: Validate HTML files
        run: |
          npm install -g html-validate
          html-validate "*.html"

  validate-backend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install backend dependencies
        run: pip install flask python-dotenv openai

      - name: Verify backend imports cleanly
        run: |
          cd backend
          python -c "import app; print('Backend imports OK')"

      - name: Lint Python with flake8
        run: |
          pip install flake8
          flake8 backend/ --max-line-length=100

Acceptance Criteria

  • .github/workflows/ci.yml created and passing on main
  • HTML validation runs on all *.html files
  • Broken link check flags forgot-password.html (and similar dead refs)
  • Python backend import verification in CI
  • flake8 lint on backend/
  • README updated with CI status badge
  • forgot-password.html either created or the link removed as part of
    this PR

Labels: enhancement, ci/cd, bug, 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