Skip to content

ci: add minimal GitHub Actions CI for pushes and pull requests #555

@avelytchko

Description

@avelytchko

Add minimal GitHub Actions CI for pushes and pull requests

Summary

The repository should have a minimal CI workflow that runs on every pull request and push to the main branch. This would catch broken builds, type errors, lint failures, and test regressions before changes are merged.

Motivation

NexusTimer is a Next.js app with TypeScript, pnpm, lint/build/test scripts, and several runtime-sensitive integrations. Right now, regressions can be introduced without an automated baseline check.

A minimal CI workflow would help catch issues such as:

  • TypeScript/build failures
  • ESLint failures
  • Broken package lockfile / dependency install problems
  • Jest test failures
  • Next.js build regressions

Proposed Workflow

Add:

.github/workflows/ci.yml

Suggested initial workflow:

name: CI

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  checks:
    name: Build, lint, and test
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Setup pnpm
        uses: pnpm/action-setup@v4
        with:
          run_install: false

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: pnpm

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Build
        run: pnpm build

      - name: Lint
        run: pnpm lint

      - name: Test
        run: pnpm test -- --runInBand

Notes

  • package.json declares Node >=24.0.0, so CI should use Node 24.
  • The project uses pnpm-lock.yaml, so pnpm install --frozen-lockfile should be used.
  • pnpm build is the most important first check because it validates the Next.js production build.
  • pnpm lint should run if the current lint script is functional in the repo.
  • pnpm test -- --runInBand keeps Jest simpler and less resource-heavy on GitHub-hosted runners.

Follow-up Improvements

These can be added later, but are not required for the first CI pass:

  • Add Playwright e2e tests as a separate workflow or optional job.
  • Add dependency caching for Next.js build cache.
  • Split build/lint/test into separate jobs for faster feedback.
  • Add branch protection requiring CI to pass before merge.
  • Add environment variable placeholders or mocks if tests/build require optional service credentials.

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