-
Notifications
You must be signed in to change notification settings - Fork 4
♻️ :: (#343) Fastlane 적용 #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
6467f8b
50dbede
10d6b13
62d00b1
26f1e0a
65bc384
62cb540
0d22b53
907690b
f3e2118
7502b01
58afbf4
22ab67d
0a71a02
26ff490
f5ee08c
d550ce9
ab8b736
cd308bd
dce9ed4
7275db6
5fd6605
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,94 @@ | ||||||||||||||||||||||||||
| name: CI/CD Pipeline | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||
| branches: [ develop ] | ||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||
| branches: [ develop ] | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||
| build-and-test: | ||||||||||||||||||||||||||
| runs-on: macos-15 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Setup XCConfig Files | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| echo "${{ secrets.XCCONFIG_BASE64 }}" | base64 --decode | tar -xz | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Setup Firebase Config Files | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| mkdir -p Projects/App/Resources/Firebase | ||||||||||||||||||||||||||
| echo "${{ secrets.GOOGLE_SERVICE_DEV_INFO }}" > Projects/App/Resources/Firebase/GoogleService-Dev-Info.plist | ||||||||||||||||||||||||||
| echo "${{ secrets.GOOGLE_SERVICE_STAGE_INFO }}" > Projects/App/Resources/Firebase/GoogleService-Stage-Info.plist | ||||||||||||||||||||||||||
| echo "${{ secrets.GOOGLE_SERVICE_PROD_INFO }}" > Projects/App/Resources/Firebase/GoogleService-Prod-Info.plist | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Setup Xcode | ||||||||||||||||||||||||||
| uses: maxim-lobanov/setup-xcode@v1 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| xcode-version: '16.2' | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Install iOS Simulator | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| sudo xcrun simctl list runtimes | ||||||||||||||||||||||||||
| xcodebuild -downloadPlatform iOS || true | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Cache SPM | ||||||||||||||||||||||||||
| uses: actions/cache@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| path: | | ||||||||||||||||||||||||||
| .build | ||||||||||||||||||||||||||
| ~/Library/Developer/Xcode/DerivedData/**/SourcePackages | ||||||||||||||||||||||||||
| key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | ||||||||||||||||||||||||||
| restore-keys: | | ||||||||||||||||||||||||||
| ${{ runner.os }}-spm- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Install mise | ||||||||||||||||||||||||||
| uses: jdx/mise-action@v2 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| install: true | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Setup Ruby | ||||||||||||||||||||||||||
| uses: ruby/setup-ruby@v1 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| ruby-version: '3.2' | ||||||||||||||||||||||||||
| bundler-cache: true | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| bundle install | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Generate Xcode project with Tuist | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| mise exec -- tuist fetch | ||||||||||||||||||||||||||
| mise exec -- tuist generate | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| TUIST_CI: "1" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Verify workspace exists | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| ls -la *.xcworkspace | ||||||||||||||||||||||||||
| echo "Workspace found!" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Run Fastlane CI | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| bundle exec fastlane ci | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 120 | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| - name: Run Fastlane CI | |
| run: | | |
| bundle exec fastlane ci | |
| env: | |
| FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 120 | |
| - name: Run Fastlane CI | |
| run: | | |
| bundle exec fastlane ci | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| TEAM_ID: ${{ secrets.TEAM_ID }} | |
| FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 120 |
🤖 Prompt for AI Agents
In .github/workflows/ci.yml around lines 53 to 57, the Fastlane job runs without
providing required environment variables (APPLE_ID and TEAM_ID) needed by
fastlane/Appfile; add references to GitHub Secrets for these values in the job's
env block (e.g., set APPLE_ID: ${{ secrets.APPLE_ID }} and TEAM_ID: ${{
secrets.TEAM_ID }}), ensure the repository has those Secrets configured, and
keep FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT as-is.
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
codecov-action v4 xcresult bundles support xcode
💡 Result:
Short answer: codecov-action v4 does not natively ingest .xcresult bundles — you must convert them to a supported coverage format (e.g., Cobertura/XML or lcov) and then upload with the v4 uploader/action. [1][2][3]
Details and options:
- codecov-action v4 uses the Codecov CLI/uploader to perform uploads; the uploader expects standard coverage files (gcov, cobertura, lcov, etc.). It does not directly parse .xcresult bundles. Use the action to upload the converted files. [1][3]
- Common approaches:
- Convert .xcresult → Cobertura (or lcov) with a tool like xcresultparser (or use xccov/xccov-to-json + a converter) and then point codecov-action at the generated XML/coverage files. Codecov’s blog documents using xcresultparser for pre-conversion. [2]
- Ensure the converted report is produced on the macOS runner (xcodebuild -resultBundlePath ...), then pass the report path(s) to the action (files/plugins/report_type as needed). [1][2]
If you want, tell me your CI workflow (macOS runner, Xcode version, how you produce .xcresult) and I’ll give an exact example workflow snippet to convert and upload.
.xcresult 번들을 지원되는 형식으로 변환하세요.
codecov-action v4는 .xcresult 번들을 직접 처리하지 않습니다. Codecov 업로더는 표준 커버리지 형식(Cobertura, lcov, gcov 등)만 지원하므로, 업로드 전에 .xcresult를 변환해야 합니다. xcresultparser 또는 유사한 도구를 사용하여 .xcresult를 Cobertura XML 형식으로 변환한 후, 변환된 파일을 업로드하도록 워크플로우를 수정하세요.
🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 67-72: the workflow currently passes
.xcresult bundles directly to codecov-action v4 which doesn't accept .xcresult;
add a prior step to convert test_output/**/*.xcresult to a supported coverage
format (e.g., Cobertura XML) using a tool like xcresultparser or an
xccov-to-cobertura converter, then update the Upload code coverage step to point
to the generated Cobertura XML files (e.g., test_output/**/*.cobertura.xml) and
keep fail_ci_if_error: false; ensure the conversion step runs on the same runner
and produces files matched by the codecov upload pattern.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| source "https://rubygems.org" | ||
|
|
||
| gem "fastlane", "~> 2.230.0" | ||
| gem "cocoapods", "~> 1.15" | ||
|
|
||
| plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') | ||
| eval_gemfile(plugins_path) if File.exist?(plugins_path) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| #!/bin/bash | ||
|
|
||
| # GitHub Secrets 설정을 위한 모든 내용 출력 스크립트 | ||
| # XCConfig 및 Firebase 설정 파일 내용을 출력 | ||
|
|
||
| echo "=========================================" | ||
| echo "GitHub Secrets 설정을 위한 파일 내용" | ||
| echo "총 4개의 Secret이 필요합니다" | ||
| echo "=========================================" | ||
| echo "" | ||
|
|
||
| echo "=== 1. XCCONFIG_BASE64 ===" | ||
| echo "이 내용을 전체 복사하여 GitHub Secret 'XCCONFIG_BASE64'에 추가하세요" | ||
| echo "---" | ||
| tar -czf - XCConfig | base64 | ||
| echo "" | ||
| echo "" | ||
|
|
||
| echo "=== 2. GOOGLE_SERVICE_DEV_INFO ===" | ||
| echo "이 내용을 전체 복사하여 GitHub Secret 'GOOGLE_SERVICE_DEV_INFO'에 추가하세요" | ||
| echo "---" | ||
| cat Projects/App/Resources/Firebase/GoogleService-Dev-Info.plist | ||
| echo "" | ||
| echo "" | ||
|
|
||
| echo "=== 3. GOOGLE_SERVICE_STAGE_INFO ===" | ||
| echo "이 내용을 전체 복사하여 GitHub Secret 'GOOGLE_SERVICE_STAGE_INFO'에 추가하세요" | ||
| echo "---" | ||
| cat Projects/App/Resources/Firebase/GoogleService-Stage-Info.plist | ||
| echo "" | ||
| echo "" | ||
|
|
||
| echo "=== 4. GOOGLE_SERVICE_PROD_INFO ===" | ||
| echo "이 내용을 전체 복사하여 GitHub Secret 'GOOGLE_SERVICE_PROD_INFO'에 추가하세요" | ||
| echo "---" | ||
| cat Projects/App/Resources/Firebase/GoogleService-Prod-Info.plist | ||
| echo "" | ||
| echo "" | ||
|
|
||
| echo "=========================================" | ||
| echo "다음 단계:" | ||
| echo "1. GitHub 저장소 → Settings → Secrets and variables → Actions" | ||
| echo "2. New repository secret 클릭" | ||
| echo "3. 위 4개 내용을 각각 복사하여 추가" | ||
| echo " - XCCONFIG_BASE64" | ||
| echo " - GOOGLE_SERVICE_DEV_INFO" | ||
| echo " - GOOGLE_SERVICE_STAGE_INFO" | ||
| echo " - GOOGLE_SERVICE_PROD_INFO" | ||
| echo "=========================================" |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Apple Developer Account | ||
| APPLE_ID=your_apple_id@example.com | ||
|
|
||
| # Team ID (from Apple Developer Portal) | ||
| TEAM_ID=YOUR_TEAM_ID | ||
|
|
||
| # App Store Connect API Key (Optional, for better automation) | ||
| # APP_STORE_CONNECT_API_KEY_ID= | ||
| # APP_STORE_CONNECT_API_ISSUER_ID= | ||
| # APP_STORE_CONNECT_API_KEY_PATH= |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| app_identifier("com.team.return.JOBIS-DSM-iOS") | ||
| apple_id(ENV["APPLE_ID"]) | ||
| team_id(ENV["TEAM_ID"]) | ||
|
|
||
| for_platform :ios do | ||
| app_identifier("com.team.return.JOBIS-DSM-iOS") | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| default_platform(:ios) | ||
|
|
||
| # Get project root directory | ||
| PROJECT_ROOT = File.expand_path("..", __dir__) | ||
| WORKSPACE_PATH = File.join(PROJECT_ROOT, "JOBIS-DSM-iOS-v2.xcworkspace") | ||
| TEST_OUTPUT_PATH = File.join(PROJECT_ROOT, "test_output") | ||
| XCODEPROJ_PATH = File.join(PROJECT_ROOT, "Projects/App/JOBIS-DSM-iOS-v2.xcodeproj") | ||
|
|
||
| platform :ios do | ||
|
|
||
| desc "Run tests" | ||
| lane :test do | ||
| run_tests( | ||
| workspace: WORKSPACE_PATH, | ||
| scheme: "JOBIS-DSM-iOS-v2-DEV", | ||
| destination: "platform=iOS Simulator,name=iPhone 16", | ||
| code_coverage: true, | ||
| result_bundle: true, | ||
| output_directory: TEST_OUTPUT_PATH, | ||
| clean: true | ||
| ) | ||
| end | ||
|
|
||
| desc "Build for development" | ||
| lane :build_dev do | ||
| sh("xcodebuild", | ||
| "-workspace", WORKSPACE_PATH, | ||
| "-scheme", "JOBIS-DSM-iOS-v2-DEV", | ||
| "-configuration", "DEV", | ||
| "-sdk", "iphonesimulator", | ||
| "clean", "build", | ||
| "-skipPackagePluginValidation", | ||
| "CODE_SIGNING_ALLOWED=NO" | ||
| ) | ||
| end | ||
|
|
||
| desc "Build for staging" | ||
| lane :build_stage do | ||
| xcodebuild( | ||
| workspace: WORKSPACE_PATH, | ||
| scheme: "JOBIS-DSM-iOS-v2-STAGE", | ||
| configuration: "STAGE", | ||
| sdk: "iphonesimulator", | ||
| destination: "platform=iOS Simulator,OS=latest,name=Any iOS Simulator Device", | ||
| clean: true, | ||
| build: true, | ||
| xcargs: "-skipPackagePluginValidation" | ||
| ) | ||
| end | ||
|
|
||
| desc "Build for production" | ||
| lane :build_prod do | ||
| build_app( | ||
| workspace: WORKSPACE_PATH, | ||
| scheme: "JOBIS-DSM-iOS-v2-PROD", | ||
| configuration: "PROD", | ||
| export_method: "app-store", | ||
| clean: true | ||
| ) | ||
| end | ||
|
|
||
| desc "Run SwiftLint" | ||
| lane :lint do | ||
| swiftlint( | ||
| mode: :lint, | ||
| executable: "Pods/SwiftLint/swiftlint", | ||
| config_file: ".swiftlint.yml", | ||
| raise_if_swiftlint_error: true | ||
| ) | ||
| end | ||
|
||
|
|
||
| desc "Deploy to TestFlight" | ||
| lane :beta do | ||
| increment_build_number(xcodeproj: XCODEPROJ_PATH) | ||
| build_prod | ||
| upload_to_testflight( | ||
| skip_waiting_for_build_processing: true | ||
| ) | ||
| end | ||
|
|
||
| desc "CI Build and Test" | ||
| lane :ci do | ||
| build_dev | ||
| # test - 시뮬레이터 설정 후 활성화 | ||
| end | ||
| end | ||
Uh oh!
There was an error while loading. Please reload this page.