From 3838c2983ac58a5ceca15e0fa5a82f397419ab2d Mon Sep 17 00:00:00 2001 From: Felipe Marino Date: Sat, 31 Aug 2024 17:44:40 +0200 Subject: [PATCH 1/6] Update to Xcode 15 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 621878f..ea52865 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: env: - DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer jobs: test: From 30d48c61a0222a5883207eabb5a1dc10252626fc Mon Sep 17 00:00:00 2001 From: Felipe Marino Date: Sat, 31 Aug 2024 17:49:17 +0200 Subject: [PATCH 2/6] Update test device --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 2f5270d..394015a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -26,7 +26,7 @@ platform :ios do package_path: "", # root code_coverage: true, scheme: "CurrencyText-Package", - device: "iPhone 12", + device: "iPhone 15 Pro", result_bundle: true, output_directory: "fastlane/test_output", xcodebuild_formatter: is_ci ? 'xcbeautify -q --is-ci --renderer github-actions' : 'xcbeautify -q' From 0b20d6d84f46e9992a310307db34b722ef6e25bb Mon Sep 17 00:00:00 2001 From: Felipe Marino Date: Sat, 31 Aug 2024 17:52:22 +0200 Subject: [PATCH 3/6] Add timeout to test step --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea52865..f004d3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v2 + - name: Check cache for Bundler dependencies uses: actions/cache@v2 with: @@ -20,10 +21,12 @@ jobs: key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- + - name: Run bundle install run: | bundle config path vendor/bundle bundle install + - name: Check cache for Swift Package Manager dependencies uses: actions/cache@v2 with: @@ -31,10 +34,13 @@ jobs: key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} restore-keys: | ${{ runner.os }}-spm- + - name: Execute fastlane `test` run: bundle exec fastlane test + - name: Report code coverage uses: codecov/codecov-action@v4 + timeout-minutes: 10 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} From 7e22a7d7ac7558236f8ef129f2deb0d8bc0009e8 Mon Sep 17 00:00:00 2001 From: Felipe Marino Date: Sat, 31 Aug 2024 17:54:43 +0200 Subject: [PATCH 4/6] Cancel in progress in the same git ref --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f004d3d..7d0b9d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: env: DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref }}' + cancel-in-progress: true + jobs: test: name: "Test" From 90c907ed2aee71c59cb907ecf6c1312188ce42e6 Mon Sep 17 00:00:00 2001 From: Felipe Marino Date: Sat, 31 Aug 2024 18:15:11 +0200 Subject: [PATCH 5/6] set specific runtime --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 394015a..495fcad 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -26,7 +26,7 @@ platform :ios do package_path: "", # root code_coverage: true, scheme: "CurrencyText-Package", - device: "iPhone 15 Pro", + device: "iPhone 15 Pro (17.5)", result_bundle: true, output_directory: "fastlane/test_output", xcodebuild_formatter: is_ci ? 'xcbeautify -q --is-ci --renderer github-actions' : 'xcbeautify -q' From 3734e2b9d0a37162c77acdb59741b406491e170a Mon Sep 17 00:00:00 2001 From: Felipe Marino Date: Sat, 31 Aug 2024 18:28:20 +0200 Subject: [PATCH 6/6] Introduce test plan and fix locale/region --- .../xcschemes/CurrencyText-Package.xcscheme | 8 ++- CurrencyText-Package.xctestplan | 49 +++++++++++++++++++ .../contents.xcworkspacedata | 3 ++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 CurrencyText-Package.xctestplan diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/CurrencyText-Package.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/CurrencyText-Package.xcscheme index 9243f5a..cec4572 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/CurrencyText-Package.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/CurrencyText-Package.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -154,6 +154,12 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"> + + + + + +