Files
SubMiner/backlog/tasks/task-35 - Add-CI-CD-pipeline-for-automated-testing-and-quality-gates.md
2026-02-13 18:29:17 -08:00

1.9 KiB

id, title, status, assignee, created_date, labels, dependencies, priority
id title status assignee created_date labels dependencies priority
TASK-35 Add CI/CD pipeline for automated testing and quality gates To Do
2026-02-14 00:57
infrastructure
ci
quality
high

Description

Add a GitHub Actions CI pipeline that runs on PRs and pushes to main. The project already has 23 test files (67+ tests) and a check-main-lines.sh quality gate script with progressive line-count targets, but none of this runs automatically.

Motivation

Without CI, regressions in tests or quality gate violations are only caught manually. As the refactoring effort (TASK-27.x) accelerates and new features land, automated checks become essential.

Scope

  1. Test runner: Run pnpm test on every PR and push to main
  2. Quality gates: Run check-main-lines.sh to enforce main.ts line-count targets
  3. Type checking: Run tsc --noEmit to catch type errors
  4. Build verification: Run make build to confirm the app compiles
  5. Platform matrix: Linux at minimum (primary target), macOS if feasible

Implementation notes

  • The project uses pnpm for package management
  • Tests use Node's built-in test runner
  • Build uses Make + tsc + electron-builder
  • Consider caching node_modules and pnpm store for speed
  • MeCab is a native dependency needed for some tests — document or skip if unavailable in CI

Acceptance Criteria

  • #1 GitHub Actions workflow runs pnpm test on every PR and push to main.
  • #2 Quality gate script (check-main-lines.sh) runs and fails the build if line count exceeds threshold.
  • #3 tsc --noEmit type check passes as a CI step.
  • #4 Build step (make build) completes without errors.
  • #5 CI results are visible on PR checks.
  • #6 Pipeline completes in under 5 minutes for typical changes.