Skip to content

[Feature] Add frontend CI workflow (TypeScript build/typecheck) — currently no frontend checks run on PRs #53

Description

@grantfox-oss

Getting Started

  1. Fork the repository: https://github.com/JointSave-org/Joint_Save
  2. Clone your fork:
   git clone https://github.com/<your-username>/Joint_Save.git
   cd Joint_Save
  1. Create a new branch:
   git checkout -b feat/frontend-ci-workflow

Overview

Found while reviewing PR #49. The repository's only CI workflow, .github/workflows/test.yml, builds and tests the Rust/Soroban smart contracts exclusively — there is no step anywhere that installs frontend dependencies, runs tsc --noEmit, or runs next build. Since the workflow has no paths: filter, it technically runs on every PR including pure-frontend ones, but it provides zero signal on whether the actual frontend changes in those PRs compile or work, since it never touches the frontend/ directory.

This was concretely demonstrated in PR #48, where a literal import import { Hero } from ... typo (duplicated import keyword) made it into a PR untouched — a typo that tsc --noEmit or next build would catch immediately, but nothing in CI was able to catch since no frontend build step exists.

Requirements

New Workflow: .github/workflows/frontend-ci.yml

name: CI – Frontend Build & Typecheck

on:
  push:
    paths:
      - 'frontend/**'
  pull_request:
    paths:
      - 'frontend/**'
  workflow_dispatch:

jobs:
  build:
    name: Build & Typecheck Frontend
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: frontend

    steps:
      - uses: actions/checkout@v4

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: "npm"
          cache-dependency-path: frontend/package-lock.json

      - name: Install dependencies
        run: npm ci

      - name: TypeScript typecheck
        run: npx tsc --noEmit

      - name: Lint
        run: npm run lint

      - name: Build
        run: npm run build

Path Filtering

Use paths: ['frontend/**'] so this workflow only runs when frontend files actually change, avoiding unnecessary CI minutes on pure-contract PRs (and vice versa — test.yml should ideally get a paths: ['smartcontract/**'] filter too, as a related but separate follow-up).

Required Secrets / Env

  • If next build requires NEXT_PUBLIC_SUPABASE_URL or other env vars to succeed, add placeholder values via repository secrets or a committed .env.ci so the build step doesn't fail purely on missing config unrelated to the actual code change.

Acceptance Criteria

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSOfficial CampaignCampaign: Official CampaignenhancementNew feature or requestpriority: highMajor impact, breaks key feature. fix next after P0

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions