setting: GitHub Actions로 CI 적용 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Build & Test | |
| on: | |
| pull_request: | |
| branches: [develop] | |
| # 같은 PR에 새 커밋이 올라오면 이전 실행은 취소 | |
| concurrency: | |
| group: pr-build-and-test-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-test: | |
| runs-on: macos-26 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Secrets 복원 | |
| env: | |
| DEBUG_XCCONFIG: ${{ secrets.DEBUG_XCCONFIG }} | |
| GOOGLE_SERVICE_STAGE_PLIST: ${{ secrets.GOOGLE_SERVICE_STAGE_PLIST }} | |
| run: | | |
| # xcconfig만 있는 폴더라 클론 시 존재하지 않음 | |
| mkdir -p Koin/Core/Configuration | |
| echo "$DEBUG_XCCONFIG" | base64 --decode > Koin/Core/Configuration/Debug.xcconfig | |
| echo "$GOOGLE_SERVICE_STAGE_PLIST" | base64 --decode > GoogleService-Info-Stage.plist | |
| - name: Xcode 버전 고정 | |
| run: sudo xcode-select -s /Applications/Xcode_26.4.1.app | |
| - name: SPM 캐시 | |
| uses: actions/cache@v4 | |
| with: | |
| path: SourcePackages | |
| key: spm-${{ hashFiles('koin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }} | |
| - name: 빌드 & 테스트 | |
| run: | | |
| xcodebuild test \ | |
| -project koin.xcodeproj \ | |
| -scheme koin-stage \ | |
| -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.4' \ | |
| -clonedSourcePackagesDirPath SourcePackages |