ci(backend): 테스트 파일까지 타입 검사 추가

빌드(tsconfig.build.json)는 spec 을 제외하고 ts-jest 는 isolatedModules 로 타입을 보지 않아,
테스트 파일의 타입 오류가 어떤 검사에도 걸리지 않았다. 타입이 틀린 목·픽스처로도 테스트가 통과한다.

- backend 에 type-check 스크립트(tsc --noEmit) 추가 — src·test·scripts 를 모두 본다
- CI backend 잡에 Type check 단계 추가, 커밋 전 점검·역할 문서와 PR 템플릿에 반영
- 이 검사로 드러난 기존 계약 테스트(error-codes.spec.ts)의 타입 오류 수정 — 테스트 의미는 그대로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 00:07:53 +09:00
parent 7897f2de20
commit 3f703b10f4
11 changed files with 30 additions and 12 deletions
+7 -1
View File
@@ -12,7 +12,7 @@ concurrency:
jobs:
backend:
name: Backend (lint · test · e2e · build)
name: Backend (lint · type-check · test · e2e · build)
runs-on: ubuntu-latest
# 멈춘 잡이 러너를 무한 점유하지 않도록 상한을 둔다
timeout-minutes: 20
@@ -53,6 +53,12 @@ jobs:
- name: Lint
run: npm run lint
# 테스트·e2e·스크립트까지 타입 검사한다.
# 빌드(tsconfig.build.json)는 spec 을 제외하고 ts-jest 는 타입을 보지 않아(isolatedModules)
# 이 단계가 없으면 테스트 파일의 타입 오류가 어디에서도 걸리지 않는다.
- name: Type check
run: npm run type-check
- name: Test
run: npm run test