Skip to content

[] Add frontend job to .github/workflows/ci.yml with lint, typecheck, and vitest steps#44

Merged
zoetaka38 merged 2 commits into
mainfrom
feature/019f086e1180-019f086e1180
Jun 29, 2026
Merged

[] Add frontend job to .github/workflows/ci.yml with lint, typecheck, and vitest steps#44
zoetaka38 merged 2 commits into
mainfrom
feature/019f086e1180-019f086e1180

Conversation

@red-codens

@red-codens red-codens Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Type of Change

  • feat — new feature
  • fix — bug fix
  • chore — tooling / maintenance
  • docs — documentation only
  • refactor — code change that neither fixes a bug nor adds a feature
  • test — adding or updating tests
  • ci — CI/CD configuration

Testing

Checklist

  • Tests pass locally
  • Lint clean (task lint)
  • Commit messages follow Conventional Commits

Task Goal

Target Repository

Corevice/open-git
All work for this task belongs in this repository. Do the implementation inside this repository's directory in the workspace; do not search or edit other repositories unless this task explicitly requires a cross-repo change.

Context

Currently only the Go backend has CI coverage. Adding a frontend job ensures TypeScript errors, ESLint violations, and failing unit tests are gated in pull requests.

Steps

  1. Read open-git/.github/workflows/ci.yml to understand the current job structure
  2. Add a frontend job (parallel to the existing backend job) with:
    • runs-on: ubuntu-latest
    • env: NEXT_PUBLIC_API_BASE_URL: http://localhost:8080 (required by zod env validation)
    • Steps: actions/checkout@v4, actions/setup-node@v4 (node 22, cache: npm), npm ci, npm run lint, npx tsc --noEmit, npx vitest run
  3. Verify open-git/package.json scripts has "lint" defined (it should, given eslint.config.mjs exists); if not, add "lint": "eslint ."
  4. Add "typecheck": "tsc --noEmit" to open-git/package.json scripts if absent

Verification Checklist

  • ci.yml contains frontend: job key
  • Job uses actions/setup-node@v4 with node-version 22 and cache npm
  • Job steps include npm ci, lint, tsc --noEmit, vitest run
  • NEXT_PUBLIC_API_BASE_URL set in job env
  • package.json has lint script
  • package.json has typecheck script
  • YAML is valid (no syntax errors)
  • TypeScript check passes locally

Original PRD Content

Next.js 15 + shadcn/ui プロジェクト初期化 実装PRD

Features

Next.js 15 + shadcn/ui プロジェクト初期化 — 残実装リスト

抽出済みコードベースには routes/forms/components がいずれも未検出のため、本機能はフロントエンド基盤の 新規初期化 が中核となる。縦切りで以下を実装する。

1. プロジェクト scaffold

  • apps/web(モノレポ配下)に Next.js 15 (App Router, TypeScript, Turbopack) を初期化
  • package.json / tsconfig.json / next.config.ts 整備(strict モード, path alias @/*
  • ESLint + Prettier + import ソート設定をモノレポ共通設定に接続

2. shadcn/u

Changes Made

CI の

状と package.json
scripts
を確認します

ci .yml に frontend
ジョブ
を追加し、 package.json
typecheck
スクリプ
トを足
します

CI

フロントエ
ンド用ジョ
ブを追加し
package.json
typecheck スクリ
プトを追加
しました。

`.

github/workflows/ci.yml
`


  • 存の backend ジョ
    ブと並列
    frontend
    ジョブ
    を追加

NEXT _PUBLIC_API_BASE_URL : http://localhost: 8080
job レ
ベルの
env に
設定

  • actions/setup -node@v4
    (Node 22

    npm cache)
    で依存

    係をセット
    アップ

npm ci
npm run lint n px tsc -- noEmit
npx vit est run
順で実行

`package

.json`

lint
スクリプト
は既存
のま
ま(
eslint . -- max-warnings =0

  • typecheck :
    "tsc -- noEmit"
    追加

[P
URPLE-M
ODIFIED-FILES
]
.github/workflows/ci
.yml
package
.json
[/P
URPLE-M
ODIFIED-FILES
]

Task ID: 019f086e-1180-71f6-a273-02a845b886b0
Generated by Purple Codens

@orange-codens orange-codens Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍊 Orange Codens レビュー

全体的な変更内容はタスク要件を満たしており、frontend ジョブの追加と typecheck スクリプトの追加は正しく実装されている。

主な指摘は2点: ①npx tsc --noEmit を使いながら npm run typecheck スクリプトを別途追加しており二重管理になっている(npm run typecheck に統一すべき・confidence 0.9)、②npx vitest run も同様に npm test に統一することでバージョン一貫性が担保される。また cache: npm 使用時の cache-dependency-path 未指定はキャッシュが機能しないリスクがある。

🔒 セキュリティ: 今回の diff は GitHub Actions の CI ワークフローへのフロントエンドジョブ追加と package.json へのスクリプト追記のみです。追加されたコードには認証・認可ロジック、外部入力の処理、暗号処理、SQL/コマンド実行などのセキュリティ上の懸念箇所は存在しません。NEXT_PUBLIC_API_BASE_URLhttp://localhost:8080 というローカルホストの固定値であり、ユーザー入力に基づく SSRF リスクもありません。セキュリティ観点での指摘事項はありません。

🟡 medium: 2 / 🔵 low: 2

その他の指摘 (4 件)
  • 🟡 [medium] .github/workflows/ci.yml:54npx vitest runpackage.jsontest スクリプトが二重管理になっている (confidence: 0.80, code.ci.npx_vitest_vs_npm_test)
  • 🟡 [medium] .github/workflows/ci.yml:42cache: npm 使用時に cache-dependency-path が未指定 (confidence: 0.65, code.ci.npm_cache_path_missing)
  • 🔵 [low] .github/workflows/ci.yml:52npx tsc --noEmit ではなく追加した typecheck スクリプトを使うべき (confidence: 0.90, code.ci.npx_tsc_vs_npm_typecheck)
  • 🔵 [low] .github/workflows/ci.yml:36frontend ジョブのステップに name が未設定でログの可読性が低い (confidence: 0.75, maintainability.ci.missing_step_names)

head: 482d384 | Orange Codens (P1)

@zoetaka38
zoetaka38 merged commit 18820d2 into main Jun 29, 2026
13 of 17 checks passed

@orange-codens orange-codens Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍊 Orange Codens レビュー

.github/workflows/ci.yml に追加された frontend ジョブは、Task Goal の要件(ubuntu-latest、job レベルの NEXT_PUBLIC_API_BASE_URLsetup-node@v4 + Node 22 + npm cache、npm ci → lint → tsc --noEmitvitest run の順)と整合しており、diff 上で確認できる範囲では blocker / critical 相当の問題は見当たりません。backendneeds なしで並列実行する構成も意図どおりです。

🔒 セキュリティ: 本 PR の diff は .github/workflows/ci.ymlfrontend CI ジョブを追加するのみで、認可・認証・入力検証・SSRF・暗号処理などアプリケーションの論理脆弱性に該当する変更は含まれていません。NEXT_PUBLIC_API_BASE_URL は CI 用の http://localhost:8080 固定値、npm ci / lint / typecheck / vitest の各 step も静的コマンドのため、diff 上から exploit 可能な問題は確認できませんでした。

指摘事項はありません。✨

head: 15e88bf | Orange Codens (P1)

@zoetaka38
zoetaka38 deleted the feature/019f086e1180-019f086e1180 branch July 2, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant