Skip to content

chore: DX 도구 도입 및 CI 강화#14

Merged
chanwoo7 merged 4 commits intomainfrom
dx/tooling-setup
Mar 21, 2026
Merged

chore: DX 도구 도입 및 CI 강화#14
chanwoo7 merged 4 commits intomainfrom
dx/tooling-setup

Conversation

@chanwoo7
Copy link
Member

@chanwoo7 chanwoo7 commented Mar 21, 2026

PR Summary

개발자 경험(DX) 향상을 위해 husky, commitlint 등 DX 도구를 도입했습니다.
CI 파이프라인을 강화하여 PR 체크, 타입 검사, 린트, 테스트, 빌드 과정을 자동화했습니다.
커밋 메시지 형식을 강제하여 일관된 커밋 기록을 유지하도록 설정했습니다.

  • husky와 commitlint를 도입하여 커밋 메시지 규칙을 적용함
  • GitHub Actions에 PR 체크 워크플로우 추가 및 기존 CI 워크플로우 개선
  • 타입스크립트 엄격 모드(strict) 활성화 및 코드 품질 검사 강화
  • 테스트 커버리지 리포트 권한 문제 수정 및 안정화

Changes

9 files changed

File Changes
.github/workflows/deploy.yml 기존 배포 워크플로우에 GraphQL 코드 생성, 타입 검사, 린트, 테스트, 빌드 단계를 추가하여 CI 강화
.github/workflows/pr-check.yml PR 체크용 GitHub Actions 워크플로우를 새로 추가하여 코드 품질 검사 및 빌드 자동화
.husky/commit-msg 커밋 메시지 규칙 검사를 위한 husky 훅 추가
.husky/pre-commit 커밋 전 린트 자동 실행을 위한 husky 훅 추가
commitlint.config.mjs commitlint 설정 파일 추가하여 한국어 커밋 메시지 허용 및 규칙 완화
package.json husky, commitlint, lint-staged 등 DX 도구 의존성 추가 및 스크립트와 설정 추가
src/features/seller/services/seller-conversation.service.spec.ts 테스트 코드 내 expect 호출 방식 일부 수정
src/global/graphql/scalars/date-time.scalar.ts DateTimeScalar의 parseValue 메서드에서 입력값 타입 검사 추가 및 예외 처리 강화
tsconfig.json 타입스크립트 설정에서 strict 모드 활성화 및 noFallthroughCasesInSwitch 옵션 추가

Impact

  • 커밋 메시지 형식이 강제되어 일관된 커밋 기록 유지 가능
  • CI 파이프라인 강화로 코드 품질 및 안정성 향상
  • 개발자 경험 개선으로 개발 생산성 증가

Checklist

  • 커밋 메시지가 규칙에 맞게 작성되었는지 확인
  • CI 워크플로우가 정상적으로 실행되는지 확인
  • 타입스크립트 빌드 및 타입 검사 오류 없는지 확인
  • 테스트가 정상적으로 통과하는지 확인
  • 린트 및 코드 스타일 검사 통과 여부 확인

Dependencies

  • husky
  • @commitlint/cli
  • @commitlint/config-conventional
  • lint-staged

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • DateTime 값 유효성 검사 강화
  • Chores

    • 개발 환경의 코드 품질 체크 및 검증 프로세스 개선
    • TypeScript 타입 검사 엄격성 수준 향상

- Phase 1: husky v9 + lint-staged 설정 (pre-commit 시 ESLint + Prettier)
- Phase 2: commitlint (Conventional Commits 강제, 한국어 허용)
- Phase 3: deploy.yml에 tsc/test 추가, pr-check.yml 신규 워크플로우
- Phase 4: Jest 커버리지 임계값 설정 (A 방식, 보수적 시작)
- Phase 5: TypeScript strict: true 전환 (DateTimeScalar 1건 수정)
- Phase 6: PR 자동화 (커버리지 리포트 댓글, PR 타이틀 lint)
@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

Warning

Rate limit exceeded

@chanwoo7 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 44088329-d76f-4644-b17e-4874238e7356

📥 Commits

Reviewing files that changed from the base of the PR and between 599729d and 0473d3d.

📒 Files selected for processing (1)
  • .github/workflows/pr-check.yml
📝 Walkthrough

Walkthrough

PR은 CI/CD 파이프라인과 Git 훅을 추가하여 커밋 메시지 검증, GraphQL 코드 생성, 타입 체크, 린트, 테스트 자동화를 구성합니다. TypeScript 엄격 모드를 활성화하고 런타임 타입 검증을 강화합니다.

Changes

Cohort / File(s) Summary
GitHub Actions 워크플로우
.github/workflows/deploy.yml, .github/workflows/pr-check.yml
배포 워크플로우에서 단일 린트·빌드 단계를 graphql:codegen, 타입 체크, 린트, 테스트로 분리. PR 체크 워크플로우 신규 추가: Node.js 24.x 설정, 의존성 설치, GraphQL 코드 생성, 타입 체크, 린트, 테스트(커버리지 포함), 빌드 실행 및 PR 제목 검증.
Husky Git 훅 설정
.husky/commit-msg, .husky/pre-commit
커밋 메시지 검증(yarn commitlint --edit $1)과 사전 커밋 린팅(yarn lint-staged) 훅 추가.
커밋 메시지 및 린팅 설정
commitlint.config.mjs, package.json
Commitlint 설정 파일 신규 추가: 기본 규칙 상속 후 주제 케이스, 본문/푸터 라인 길이 제한 비활성화. package.json에 prepare 스크립트, commitlint/husky/lint-staged 의존성 추가 및 린트-스테이징 규칙 구성.
테스트 포맷팅
src/features/seller/services/seller-conversation.service.spec.ts
Jest 어설션 표현식을 단일 라인에서 멀티라인으로 재포맷(기능 변경 없음).
타입 안전성 강화
src/global/graphql/scalars/date-time.scalar.ts, tsconfig.json
DateTimeScalar의 parseValue 메서드가 unknown 타입을 허용하고 문자열 타입 검사 추가. TypeScript strict: true 활성화, noFallthroughCasesInSwitch 기본값 변경.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 변경 내용의 핵심을 간결하게 요약하고 있으며, DX 도구 도입과 CI 강화라는 주요 변경사항을 명확히 전달합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dx/tooling-setup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the ⚙️ Setting 개발환경 세팅 label Mar 21, 2026
@github-actions github-actions bot changed the title chore: DX 도구 도입 (husky, commitlint, CI 강화, strict: true) chore: DX 도구 도입 및 CI 강화 Mar 21, 2026
- coverage-report job에 pull-requests: write 권한 추가
- GITHUB_TOKEN 기본 권한이 read-only여서 댓글 작성 실패하던 문제 해결
@github-actions

This comment was marked as resolved.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/pr-check.yml:
- Around line 1-10: Add an explicit permissions block to the PR Check workflow
(the top-level "name: PR Check" / "on: pull_request" definition) to enforce
least-privilege access instead of relying on defaults, and where specific jobs
(see the jobs referenced around concurrency and the job definitions) need
different rights, override them with job-level permissions; ensure you only
grant read/write scopes required (e.g., read for repository contents, limited
write for checks or statuses if used), and avoid granting broad write
permissions or secrets access to forked PRs by keeping GITHUB_TOKEN permissions
minimal.
- Around line 56-62: The Coverage Report step using
ArtiomTr/jest-coverage-report-action@v2 currently sets skip-step: install but
does not ensure prior setup of Node or project dependencies; add a preceding
workflow step to run actions/setup-node (or equivalent) and an npm install/yarn
install step so that the action's test-script (npx jest --coverage --ci) can
run; specifically, ensure the job contains a setup-node step and a dependency
install step before the action named "Coverage Report" (which invokes
test-script and skip-step: install).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9e7536da-8aba-42f8-acbf-f68492540586

📥 Commits

Reviewing files that changed from the base of the PR and between 7b1f278 and 599729d.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/deploy.yml
  • .github/workflows/pr-check.yml
  • .husky/commit-msg
  • .husky/pre-commit
  • commitlint.config.mjs
  • package.json
  • src/features/seller/services/seller-conversation.service.spec.ts
  • src/global/graphql/scalars/date-time.scalar.ts
  • tsconfig.json

- npx jest 대신 yarn jest 사용하여 프로젝트 jest 29 설정과 호환
- coverage-report job에 Node.js setup + yarn install 추가
- 워크플로우 최상위에 permissions: contents: read 추가 (최소 권한 원칙)
@github-actions
Copy link

github-actions bot commented Mar 21, 2026

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 47.73% 1156/2422
🔴 Branches 36.36% 557/1532
🔴 Functions 32.4% 173/534
🔴 Lines 47.59% 1046/2198

Test suite run success

186 tests passing in 24 suites.

Report generated by 🧪jest coverage report action from 0473d3d

@chanwoo7 chanwoo7 merged commit 6444d4d into main Mar 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ Setting 개발환경 세팅

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant