From a1e5a53059fc44e36db5b09191819320675862bd Mon Sep 17 00:00:00 2001 From: Jiwoong CHOI Date: Wed, 21 Aug 2024 12:36:08 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20CI=20=ED=8C=8C=EC=9D=B4=ED=94=84?= =?UTF-8?q?=EB=9D=BC=EC=9D=B8=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/BudgetBuddies.yml | 41 +++++++++++++++++++++++++++++ BudgetBuddies/Project.swift | 33 ++++++++++++++++++----- 2 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/BudgetBuddies.yml diff --git a/.github/workflows/BudgetBuddies.yml b/.github/workflows/BudgetBuddies.yml new file mode 100644 index 0000000..81fac64 --- /dev/null +++ b/.github/workflows/BudgetBuddies.yml @@ -0,0 +1,41 @@ +name: BudgetBuddies Continous Integration + +on: + push: + branches: [ "jayn2u" ] + pull_request: + branches: [ "develop" ] + +jobs: + build-and-test: + name: 빌드 및 테스트 + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Tuist + run: | + bash <(curl -Ls https://install.tuist.io) + + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Clean tuist cache + run: tuist clean + + - name: Install dependencies + run: tuist install + + - name: Generate Xcode project + run: tuist generate + + - name: Build + run: | + xcodebuild \ + -workspace BudgetBuddies/BudgetBuddies.xcworkspace \ + -scheme BudgetBuddies 'platform=iOS Simulator, OS=latest, name=iPhone 15 Pro' \ + -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO \ No newline at end of file diff --git a/BudgetBuddies/Project.swift b/BudgetBuddies/Project.swift index 548251d..2307166 100644 --- a/BudgetBuddies/Project.swift +++ b/BudgetBuddies/Project.swift @@ -1,9 +1,21 @@ import ProjectDescription -let settings: Settings = .settings(configurations: [ - .debug(name: "Debug", xcconfig: "BudgetBuddies/Resources/Debug.xcconfig"), - .release(name: "Release", xcconfig: "BudgetBuddies/Resources/Release.xcconfig"), -]) +let budgetBuddiesSettings: Settings = .settings( + base: [ + // 코드 서명 없이 세팅 + "CODE_SIGN_STYLE": "Automatic", + "CODE_SIGN_IDENTITY": "-", + "CODE_SIGNING_REQUIRED": "NO", + "CODE_SIGNING_ALLOWED": "NO", + + // Running Device를 iPhone으로 제한 + "TARGETED_DEVICE_FAMILY": "1" + ], + configurations: [ + .debug(name: "Debug", xcconfig: "BudgetBuddies/Resources/Debug.xcconfig"), + .release(name: "Release", xcconfig: "BudgetBuddies/Resources/Release.xcconfig"), + ] +) let budgetBuddiesInfoPlist: InfoPlist = .extendingDefault(with: [ "UILaunchStoryboardName": "LaunchScreen.storyboard", @@ -22,12 +34,15 @@ let budgetBuddiesInfoPlist: InfoPlist = .extendingDefault(with: [ "NSAppTransportSecurity": [ "NSAllowsArbitraryLoads": true ], + "CFBundleDevelopmentRegion": "ko", ]) let project = Project( name: "BudgetBuddies", - settings: settings, targets: [ + + // MARK: - BudgetBuddies App + .target( name: "BudgetBuddies", destinations: .iOS, @@ -46,8 +61,11 @@ let project = Project( .external(name: "RxCocoa", condition: .none), .external(name: "PromiseKit", condition: .none), ], - settings: settings + settings: budgetBuddiesSettings ), + + // MARK: - BudgetBuddiesTests + .target( name: "BudgetBuddiesTests", destinations: .iOS, @@ -61,6 +79,9 @@ let project = Project( .target(name: "BudgetBuddies", condition: .none) ] ), + + // MARK: - BudgetBuddiesUITests + .target( name: "BudgetBuddiesUITests", destinations: .iOS,