Skip to content

ci: 테스트 게이트 추가 + SwiftLint Linux 이전 (무료 플랜 비용 최적화) - #111

Merged
gomminjae merged 4 commits into
developfrom
ci/test-gate-cheaper-lint
Jul 4, 2026
Merged

gomminjae merged 4 commits into
developfrom
ci/test-gate-cheaper-lint

Conversation

@gomminjae

Copy link
Copy Markdown
Collaborator

목적

Private + 무료 플랜(월 ~200 macOS분) 제약 하에서, 테스트 없이 develop에 병합되는 구멍을 최소 비용으로 막는다.

변경

1. SwiftLint → Linux 러너 (ci.yml)

  • macos-15 → ubuntu-latest + ghcr.io/realm/swiftlint:0.62.2 컨테이너
  • 매 PR 도는 잡을 10배 저렴한 러너로. lint는 macOS 불필요
  • 바이너리 다운로드/캐시 스텝 제거(이미지가 곧 바이너리)

2. 테스트 게이트 신규 (test.yml)

  • 트리거: develop 대상 PR + 코드 변경(paths) + 수동 dispatch
    • main PR 제외(deploy가 어차피 빌드), 문서/설정 변경은 스킵
  • timeout-minutes: 25 — 폭주 과금 방어
  • Tuist/.build(SPM) + DerivedData 캐시 → 증분 재빌드
  • xcodebuild test 시뮬레이터 대상, 서명/아카이브 없음(deploy보다 훨씬 쌈)
  • xcconfig 생성 스텝은 deploy.yml에서 재사용 (API_BASE_URL 없으면 APIEnvironment fatalError)

보류 (의도)

tuist cache(모듈 바이너리 캐시)는 워밍 비용 > 절감이라 무료 hosted 플랜에선 제외. self-hosted 러너 또는 Tuist remote 캐시 도입 시 붙일 것.

검증

  • 양 워크플로 YAML 파싱 OK
  • 실제 실행 검증은 이 PR의 CI에서 (첫 test 실행은 캐시 콜드라 풀빌드 1회)

🤖 Generated with Claude Code

- SwiftLint: macos-15 → ubuntu-latest + 공식 Docker 이미지 (macOS 10배 과금 제거)
- test.yml 신규: develop PR + 코드 변경(paths) 시에만 xcodebuild test
  - main PR 제외(deploy가 빌드), 25분 타임아웃으로 폭주 과금 방어
  - SPM(Tuist/.build) + DerivedData 캐시로 증분 재빌드
  - deploy.yml의 xcconfig 생성 스텝 재사용 (API_BASE_URL 필수)

tuist cache(바이너리 캐시)는 워밍 비용 > 절감이라 무료 hosted 플랜에선 보류.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

gomminjae and others added 3 commits July 4, 2026 20:47
Linux 러너 이전 후 표면화된 line_length serious 위반(MockFetchMypageProfileUseCase.swift)
해결. 목/스텁 모듈은 테스트 스캐폴딩이므로 이미 제외된 Tests와 동일하게 처리.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Newdok 스킴에 testAction이 없어 xcodebuild test가 실패(exit 66)했다.
tuist test는 모든 모듈의 테스트 타깃을 빌드·실행하고 시뮬레이터도 자동 선택한다.
로컬 tuist test --platform ios 통과 확인.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI가 여태 테스트를 안 돌려(SwiftLint만) 숨어 있던 결함들:
- ProjectHelper: 모든 Testing 타깃에 .shared 추가 (SearchTesting이 Shared 참조하나 미선언 → 빌드 실패)
- LoginViewModel: handleLoginError switch에 .tokenPersistenceFailed 처리 추가 (PR #110에서 케이스 추가 후 non-exhaustive 회귀)
- MypageTests: StubTokenStorage.saveAccessToken을 -> Bool로 동기화 (PR #110 프로토콜 변경 미반영)

로컬 tuist test --platform ios 전체 통과 확인.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gomminjae
gomminjae merged commit a324c81 into develop Jul 4, 2026
2 checks passed
@gomminjae
gomminjae deleted the ci/test-gate-cheaper-lint branch July 4, 2026 12:28
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