Getting Started
- Fork the repository: https://github.com/JointSave-org/Joint_Save
- Clone your fork:
git clone https://github.com/<your-username>/Joint_Save.git
cd Joint_Save
- 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
Getting Started
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, runstsc --noEmit, or runsnext build. Since the workflow has nopaths: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 thefrontend/directory.This was concretely demonstrated in PR #48, where a literal
import import { Hero } from ...typo (duplicatedimportkeyword) made it into a PR untouched — a typo thattsc --noEmitornext buildwould catch immediately, but nothing in CI was able to catch since no frontend build step exists.Requirements
New Workflow:
.github/workflows/frontend-ci.ymlPath 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.ymlshould ideally get apaths: ['smartcontract/**']filter too, as a related but separate follow-up).Required Secrets / Env
next buildrequiresNEXT_PUBLIC_SUPABASE_URLor other env vars to succeed, add placeholder values via repository secrets or a committed.env.ciso the build step doesn't fail purely on missing config unrelated to the actual code change.Acceptance Criteria
frontend/**tsc --noEmitstep catches TypeScript syntax/type errors (verify by intentionally introducing a syntax error in a test branch and confirming the workflow fails)next buildstep catches build-breaking issues (e.g. theimport importtypo case from PR feat: add floating back-to-top button with smooth scroll and reduced-motion support (Closes #37)feat: add floating back-to-top button with smooth scroll and reduced-… #48)