From 435f48a0db1770923312009ad6390c62ab7bde94 Mon Sep 17 00:00:00 2001 From: hoon Date: Fri, 9 Feb 2024 23:10:09 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20test=20ci=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/action-test.ci.yml | 30 ++++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/action-test.ci.yml b/.github/workflows/action-test.ci.yml index 058dc191..5f34cad5 100644 --- a/.github/workflows/action-test.ci.yml +++ b/.github/workflows/action-test.ci.yml @@ -30,7 +30,6 @@ jobs: # - "14.3" # Swift 5.8 - "15.0" # Swift 5.9 - steps: - name: Runner Overview run: system_profiler SPHardwareDataType SPSoftwareDataType SPDeveloperToolsDataType @@ -48,18 +47,27 @@ jobs: echo $ENV >> $OCCUPY_SECRET_DIR/$OCCUPY_SECRET_DIR_FILE_NAME # CocoaPod 을 사용하므로 설치후 테스트 진행 - # - name: Install CocoaPods - # run: | - # pod install --repo-update --project-directory=KCS + - name: Install CocoaPods + run: | + pod install --repo-update --project-directory=KCS + + - name: Build + env: + platform: ${{ 'iOS Simulator' }} + run: | + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` + xcodebuild build-for-testing -workspace KCS/KCS.xcworkspace -scheme "KCS" -destination "platform=$platform,name=$device" -skipPackagePluginValidation -skipMacroValidation + + - name: Test + env: + platform: ${{ 'iOS Simulator' }} + run: | + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` + xcodebuild test-without-building -workspace KCS/KCS.xcworkspace -scheme "KCS" -destination "platform=$platform,name=$device" -skipPackagePluginValidation -skipMacroValidation - - name: Install CocoaPods dependencies - working-directory: KCS - run: bundle exec pod install || bundle exec pod install --repo-update # - name: Test # run: | # xcodebuild clean test -workspace KCS/KCS.xcworkspace -scheme "KCS" -destination "platform=iOS Simulator,name=iPhone 14 Pro" - - - name: Test - run: | - xcodebuild clean test -project KCS/KCS.xcodeproj -scheme "KCS" -destination "platform=iOS Simulator,name=iPhone 14 Pro" \ No newline at end of file