Skip to content

[#452] 핵심 로직 유닛 테스트 추가 및 PR 단위 테스트 CI 구축 - #453

Merged
Hrepay merged 6 commits into
developfrom
setting/#452
Aug 31, 2026
Merged

[#452] 핵심 로직 유닛 테스트 추가 및 PR 단위 테스트 CI 구축#453
Hrepay merged 6 commits into
developfrom
setting/#452

Conversation

@Hrepay

@Hrepay Hrepay commented Aug 31, 2026

Copy link
Copy Markdown
Member

#️⃣ 관련 이슈

Resolved #452

💡작업 내용

버그가 잦았던 핵심 로직에 유닛 테스트 29건을 추가하고, PR마다 자동으로 돌도록 CI를 연결했습니다. 테스트 도입 1단계이며 스냅샷(2단계)·E2E(3단계)는 별도 이슈로 진행합니다.

유닛 테스트 (EATSSU/Tests/UnitTests, 29 tests / 0.06s)

  • PartnershipLikeLogicTests — 찜 토글 대상 계산(토글 API 중복 호출 방지), 찜 목록 응답 해석, 최근 추가순 정렬, storeKey
  • AcademicNameLocalizationTests — 학과명 키 정규화(아래아·가운뎃점·괄호), 언어별 표기, 미등록/빈 문자열 폴백 — 최근 QA에서 나온 버그들의 재현 테스트
  • MealMenuDisplayTests — 대표메뉴만 표시/전체 폴백 규칙, /meals·/menus 언어 파라미터
  • StoreCategoryMappingTests — 식당·착한가격 카테고리·제휴 필터 ↔ 서버 문자열 매핑
  • AppLanguageSandbox — 테스트가 앱 언어를 바꿔도 UserDefaults를 원복하는 헬퍼
  • 테스트를 위해 PartnershipLikeManager의 순수 로직 3개를 static 함수로 추출 (동작 변화 없음)

CI (.github/workflows/continuous-integration.yml)

  • 기존 워크플로는 옛 경로(EATSSU_MVC)와 qa 브랜치를 참조해 동작하지 않던 상태 → develop 대상 PR마다 유닛 테스트 실행으로 교체
  • 시크릿은 기존 Configuration Files environment의 BASE_URL/KAKAO_API_KEY 재사용

프로젝트 설정

  • 테스트 타깃에 프로젝트 공통 -all_load -ObjC가 상속돼 링크가 깨지던 문제 수정 (OTHER_LDFLAGS 무효화)
  • EATSSU-DEV 스킴의 test 액션이 EATSSUUnitTests를 실행하도록 수정 (⌘U로 실행 가능)
  • 샘플 테스트 파일 삭제

💬리뷰 요구사항(선택)

  • 이 PR이 새 CI의 첫 실행입니다. Unit Tests 체크가 초록인지 확인 부탁드립니다 (러너 환경 문제면 후속 커밋으로 보정).
  • 제안 규칙: 앞으로 로직 버그 수정 PR에는 해당 버그의 재현 테스트를 함께 추가.

Summary by CodeRabbit

  • 버그 수정

    • 제휴 매장 찜 추가·해제와 최근 찜 정렬 동작을 안정화했습니다.
    • 학과·단과대 이름의 한국어 및 영어 표시를 개선했습니다.
    • 변동·고정 식단의 언어별 메뉴 표시 규칙을 보완했습니다.
    • 매장 카테고리와 서버 정보 간 변환 정확도를 높였습니다.
  • 품질 개선

    • 주요 언어 설정, 식단 표시, 카테고리 및 찜 기능에 대한 자동 검증을 강화했습니다.

@Hrepay
Hrepay had a problem deploying to Configuration Files August 31, 2026 01:38 — with GitHub Actions Failure
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 1 minute.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: df678df5-8ae0-4d02-b593-7aa0c3a828bd

📥 Commits

Reviewing files that changed from the base of the PR and between 2eb9442 and e7fc042.

📒 Files selected for processing (9)
  • .github/workflows/continuous-integration.yml
  • EATSSU/App/Sources/Data/Like/PartnershipLikeManager.swift
  • EATSSU/Project.swift
  • EATSSU/Tests/UnitTests/AcademicNameLocalizationTests.swift
  • EATSSU/Tests/UnitTests/AppLanguageSandbox.swift
  • EATSSU/Tests/UnitTests/MealMenuDisplayTests.swift
  • EATSSU/Tests/UnitTests/PartnershipLikeLogicTests.swift
  • EATSSU/Tests/UnitTests/SampleTests.swift
  • EATSSU/Tests/UnitTests/StoreCategoryMappingTests.swift
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch setting/#452

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.

@Hrepay Hrepay self-assigned this Aug 31, 2026
@Hrepay
Hrepay had a problem deploying to Configuration Files August 31, 2026 01:42 — with GitHub Actions Failure
@Hrepay
Hrepay had a problem deploying to Configuration Files August 31, 2026 01:48 — with GitHub Actions Failure
@Hrepay
Hrepay had a problem deploying to Configuration Files August 31, 2026 01:53 — with GitHub Actions Failure
@Hrepay
Hrepay had a problem deploying to Configuration Files August 31, 2026 02:13 — with GitHub Actions Failure
@Hrepay
Hrepay temporarily deployed to Configuration Files August 31, 2026 02:36 — with GitHub Actions Inactive
@Hrepay
Hrepay merged commit e1c2a39 into develop Aug 31, 2026
2 checks passed
@Hrepay
Hrepay deleted the setting/#452 branch August 31, 2026 04:44
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.

[Setting] 로직 유닛 테스트 기반 구축 및 CI 연결

1 participant