From c2e83c4a5826ba00c2331132b25f37df8e1cf6ff Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 19:49:11 -0400 Subject: [PATCH 01/32] Create ios.yml Add suggested GitHub Actions workflow --- .github/workflows/ios.yml | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 0000000..9827103 --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,44 @@ +name: iOS starter workflow + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + name: Build and Test default scheme using any available iPhone simulator + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + - name: Build + env: + scheme: ${{ 'default' }} + 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$//"` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" + - name: Test + env: + scheme: ${{ 'default' }} + 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$//"` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" From 2770bd5fb4c003d054001a9e56fb135c426f202a Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 19:59:45 -0400 Subject: [PATCH 02/32] Rewrite basic GHA to run fastlane tests, add gh to brewfile - Where GHA = GitHub Actions - gh = GitHub command line tool --- .github/workflows/ios.yml | 37 ++++++------------------------ Brewfile | 1 + Brewfile.lock.json | 47 +++++++++++++++++++++++++++++++++++---- 3 files changed, 51 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 9827103..082c2b0 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -1,4 +1,4 @@ -name: iOS starter workflow +name: iOS Test Suite on: push: @@ -8,37 +8,14 @@ on: jobs: build: - name: Build and Test default scheme using any available iPhone simulator + name: Run tests with fastlane runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Set Default Scheme - run: | - scheme_list=$(xcodebuild -list -json | tr -d "\n") - default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") - echo $default | cat >default - echo Using default scheme: $default - - name: Build - env: - scheme: ${{ 'default' }} - 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$//"` - if [ $scheme = default ]; then scheme=$(cat default); fi - if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi - file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` - xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" - - name: Test - env: - scheme: ${{ 'default' }} - 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$//"` - if [ $scheme = default ]; then scheme=$(cat default); fi - if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi - file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` - xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" + - run: | + brew bundle install + bundler install + - run: | + bundle exec fastlane ios tests \ No newline at end of file diff --git a/Brewfile b/Brewfile index 8ac4522..199452f 100644 --- a/Brewfile +++ b/Brewfile @@ -1,3 +1,4 @@ tap "homebrew/bundle" brew "rbenv" brew "ruby-build" +brew "gh" diff --git a/Brewfile.lock.json b/Brewfile.lock.json index 591ed47..2f4b27a 100644 --- a/Brewfile.lock.json +++ b/Brewfile.lock.json @@ -2,7 +2,7 @@ "entries": { "tap": { "homebrew/bundle": { - "revision": "b1f54020a4b7ac0df4477896b7af155b18abf030" + "revision": "836b67f84a21deec9016253f41f994c2a98cea15" } }, "brew": { @@ -21,15 +21,54 @@ } }, "ruby-build": { - "version": "20240917", + "version": "20241007", "bottle": { "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "all": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/ruby-build/blobs/sha256:a69d04a25971f1f19d4cc2893adafc60e472dbb2fca2799ebf6de25d2e5e1658", - "sha256": "a69d04a25971f1f19d4cc2893adafc60e472dbb2fca2799ebf6de25d2e5e1658" + "url": "https://ghcr.io/v2/homebrew/core/ruby-build/blobs/sha256:545ae4c7dcb39bbc6a964a4d81c0ed2e5f0c78455a265ebcb5ce9b831cf60149", + "sha256": "545ae4c7dcb39bbc6a964a4d81c0ed2e5f0c78455a265ebcb5ce9b831cf60149" + } + } + } + }, + "gh": { + "version": "2.58.0", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sequoia": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:f3cb6b84271ebd44425139e995f6c11fb8405c73b8eebba18a2155895670e1f3", + "sha256": "f3cb6b84271ebd44425139e995f6c11fb8405c73b8eebba18a2155895670e1f3" + }, + "arm64_sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:f3cb6b84271ebd44425139e995f6c11fb8405c73b8eebba18a2155895670e1f3", + "sha256": "f3cb6b84271ebd44425139e995f6c11fb8405c73b8eebba18a2155895670e1f3" + }, + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:f3cb6b84271ebd44425139e995f6c11fb8405c73b8eebba18a2155895670e1f3", + "sha256": "f3cb6b84271ebd44425139e995f6c11fb8405c73b8eebba18a2155895670e1f3" + }, + "sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:8b8a4655d289d7cef3471bb479dcf1bd3665440c3c9fa4412ac5f6e02450f849", + "sha256": "8b8a4655d289d7cef3471bb479dcf1bd3665440c3c9fa4412ac5f6e02450f849" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:c98643a52ed2ea1afab0bea2c4168b1d045bd21b2eef22c68e5706de7dc59c81", + "sha256": "c98643a52ed2ea1afab0bea2c4168b1d045bd21b2eef22c68e5706de7dc59c81" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:9b9c42f277d56692ac8a13af727eb71b6ad912c58700f0646d1e3a233586bba6", + "sha256": "9b9c42f277d56692ac8a13af727eb71b6ad912c58700f0646d1e3a233586bba6" } } } From 4b3f38b2ef1290f96e5f90e5d6df45245d383e9c Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:07:31 -0400 Subject: [PATCH 03/32] Change macOS image to macos-15-arm64 for Xcode 16 - See: https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 082c2b0..d1c818f 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Run tests with fastlane - runs-on: macos-latest + runs-on: macos-15-arm64 steps: - name: Checkout From 478adbf8568a15101e2f84dc753804f06967e464 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:15:31 -0400 Subject: [PATCH 04/32] Add GitHub Action to report passing/failing status of iOS-Test-Suite CI job --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8e99c02..fc3029d 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Bike Index -![GitHub License](https://img.shields.io/github/license/bikeindex/bike_index_ios) +![GitHub License](https://img.shields.io/github/license/bikeindex/bike_index_ios) | [![iOS Test Suite](https://github.com/bikeindex/bike_index_ios/actions/workflows/ios.yml/badge.svg)](https://github.com/bikeindex/bike_index_ios/actions/workflows/ios.yml) > [!IMPORTANT] > This project is incomplete and under active development. > No guarantees are provided. -iOS client for bikeindex.org +iOS client for [bikeindex.org](https://bikeindex.org) ## Quick Start From b4ecb6369b1626ed14e627f8e67e1166f1b0b0e4 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:16:46 -0400 Subject: [PATCH 05/32] Fix GHA runner-image YAML label --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index d1c818f..ee09f93 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Run tests with fastlane - runs-on: macos-15-arm64 + runs-on: macos-15 steps: - name: Checkout From 18b61896cd103abd063650a9fe483a40d2e0c5ae Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:22:25 -0400 Subject: [PATCH 06/32] Debug: list simulators available --- .github/workflows/ios.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index ee09f93..86dbe70 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -18,4 +18,5 @@ jobs: brew bundle install bundler install - run: | - bundle exec fastlane ios tests \ No newline at end of file + xcodebuild -showBuildSettings -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations + # bundle exec fastlane ios tests From dba1271aab153f79b094425c226dd752a165f2ad Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:24:10 -0400 Subject: [PATCH 07/32] Restore fastlane ios tests command --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 86dbe70..30c8ff5 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -19,4 +19,4 @@ jobs: bundler install - run: | xcodebuild -showBuildSettings -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations - # bundle exec fastlane ios tests + bundle exec fastlane ios tests From b05d68707dead1fbee9296dd4cce8ab8686bbad3 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:06:53 -0400 Subject: [PATCH 08/32] Add BikeIndex-development.xcconfig configuration for running tests --- .github/workflows/ios.yml | 17 +++++++++++++++++ fastlane/Fastfile | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 30c8ff5..1b9aab3 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -17,6 +17,23 @@ jobs: - run: | brew bundle install bundler install + - name: Set up xcconfig secrets (see README#quick-start) + env: + API_SECRET: ${{ BikeIndex.development.API_SECRET }} + API_CLIENT_ID: ${{ BikeIndex.development.API_CLIENT_ID }} + API_HOST: ${{ BikeIndex.development.API_HOST }} + API_PORT: ${{ BikeIndex.development.API_PORT }} + API_REDIRECT_URI: ${{ BikeIndex.development.API_REDIRECT_URI }} + DEVELOPMENT_TEAM: ${{ BikeIndex.development.DEVELOPMENT_TEAM }} + PRODUCT_BUNDLE_IDENTIFIER: ${{ BikeIndex.development.PRODUCT_BUNDLE_IDENTIFIER }} + run: | + echo "API_SECRET = $SUPER_SECRET" >> BikeIndex-development.xcconfig + echo "API_CLIENT_ID = $API_CLIENT_ID" >> BikeIndex-development.xcconfig + echo "API_HOST = $API_HOST" >> BikeIndex-development.xcconfig + echo "API_PORT = $API_PORT" >> BikeIndex-development.xcconfig + echo "API_REDIRECT_URI = $API_REDIRECT_URI" >> BikeIndex-development.xcconfig + echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> BikeIndex-development.xcconfig + echo "PRODUCT_BUNDLE_IDENTIFIER = $PRODUCT_BUNDLE_IDENTIFIER" >> BikeIndex-development.xcconfig - run: | xcodebuild -showBuildSettings -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations bundle exec fastlane ios tests diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0fa6a4f..c3e1ac0 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -19,8 +19,8 @@ platform :ios do desc "Run unit tests" lane :tests do run_tests(project: "BikeIndex.xcodeproj", - devices: ["iPhone 16", "iPhone 16 Plus", - "iPad (10th generation)"], + devices: ["iPhone 16 (18.0)", "iPhone 16 Plus (18.0)", + "iPad (10th generation) (18.0)"], scheme: "Debug (development)") end end From 0afa6b8723b72ca9549fdfb35f0c171d4ecbc4f5 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:09:50 -0400 Subject: [PATCH 09/32] Start CI fresh From c5ca7c32548441aab65ffe5e774fe635c102d020 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:11:30 -0400 Subject: [PATCH 10/32] Adjust source of env secrets --- .github/workflows/ios.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 1b9aab3..c0f7c74 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -19,13 +19,13 @@ jobs: bundler install - name: Set up xcconfig secrets (see README#quick-start) env: - API_SECRET: ${{ BikeIndex.development.API_SECRET }} - API_CLIENT_ID: ${{ BikeIndex.development.API_CLIENT_ID }} - API_HOST: ${{ BikeIndex.development.API_HOST }} - API_PORT: ${{ BikeIndex.development.API_PORT }} - API_REDIRECT_URI: ${{ BikeIndex.development.API_REDIRECT_URI }} - DEVELOPMENT_TEAM: ${{ BikeIndex.development.DEVELOPMENT_TEAM }} - PRODUCT_BUNDLE_IDENTIFIER: ${{ BikeIndex.development.PRODUCT_BUNDLE_IDENTIFIER }} + API_SECRET: ${{ secrets.API_SECRET }} + API_CLIENT_ID: ${{ secrets.API_CLIENT_ID }} + API_HOST: ${{ secrets.API_HOST }} + API_PORT: ${{ secrets.API_PORT }} + API_REDIRECT_URI: ${{ secrets.API_REDIRECT_URI }} + DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} + PRODUCT_BUNDLE_IDENTIFIER: ${{ secrets.PRODUCT_BUNDLE_IDENTIFIER }} run: | echo "API_SECRET = $SUPER_SECRET" >> BikeIndex-development.xcconfig echo "API_CLIENT_ID = $API_CLIENT_ID" >> BikeIndex-development.xcconfig From 571ffa95c116c04e21ba26bca8421c3d4d3ff443 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:13:53 -0400 Subject: [PATCH 11/32] Remove (18.0) from device identifiers --- fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c3e1ac0..0fa6a4f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -19,8 +19,8 @@ platform :ios do desc "Run unit tests" lane :tests do run_tests(project: "BikeIndex.xcodeproj", - devices: ["iPhone 16 (18.0)", "iPhone 16 Plus (18.0)", - "iPad (10th generation) (18.0)"], + devices: ["iPhone 16", "iPhone 16 Plus", + "iPad (10th generation)"], scheme: "Debug (development)") end end From 26692c133027138e49d8f634cdedce8c6065b032 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:48:25 -0400 Subject: [PATCH 12/32] Change GHA variables to vars. syntax --- .github/workflows/ios.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index c0f7c74..5da2516 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -21,11 +21,11 @@ jobs: env: API_SECRET: ${{ secrets.API_SECRET }} API_CLIENT_ID: ${{ secrets.API_CLIENT_ID }} - API_HOST: ${{ secrets.API_HOST }} - API_PORT: ${{ secrets.API_PORT }} - API_REDIRECT_URI: ${{ secrets.API_REDIRECT_URI }} - DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} - PRODUCT_BUNDLE_IDENTIFIER: ${{ secrets.PRODUCT_BUNDLE_IDENTIFIER }} + API_HOST: ${{ vars.API_HOST }} + API_PORT: ${{ vars.API_PORT }} + API_REDIRECT_URI: ${{ vars.API_REDIRECT_URI }} + DEVELOPMENT_TEAM: ${{ vars.DEVELOPMENT_TEAM }} + PRODUCT_BUNDLE_IDENTIFIER: ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }} run: | echo "API_SECRET = $SUPER_SECRET" >> BikeIndex-development.xcconfig echo "API_CLIENT_ID = $API_CLIENT_ID" >> BikeIndex-development.xcconfig From 9aa5682e5b098de9171bfdbcc628cf38a68f86a0 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:57:44 -0400 Subject: [PATCH 13/32] Fix API_SECRET variable reference --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 5da2516..d52c8c0 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -27,7 +27,7 @@ jobs: DEVELOPMENT_TEAM: ${{ vars.DEVELOPMENT_TEAM }} PRODUCT_BUNDLE_IDENTIFIER: ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }} run: | - echo "API_SECRET = $SUPER_SECRET" >> BikeIndex-development.xcconfig + echo "API_SECRET = $API_SECRET" >> BikeIndex-development.xcconfig echo "API_CLIENT_ID = $API_CLIENT_ID" >> BikeIndex-development.xcconfig echo "API_HOST = $API_HOST" >> BikeIndex-development.xcconfig echo "API_PORT = $API_PORT" >> BikeIndex-development.xcconfig From bdb5629aeddee0fb9686a77ea1675a7e880ecb2e Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 22:01:53 -0400 Subject: [PATCH 14/32] Upload xcconfig output artifact to debug --- .github/workflows/ios.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index d52c8c0..d276f1c 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -34,6 +34,11 @@ jobs: echo "API_REDIRECT_URI = $API_REDIRECT_URI" >> BikeIndex-development.xcconfig echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> BikeIndex-development.xcconfig echo "PRODUCT_BUNDLE_IDENTIFIER = $PRODUCT_BUNDLE_IDENTIFIER" >> BikeIndex-development.xcconfig + - uses: actions/upload-artifact@v4 + with: + name: config + path: BikeIndex-development.xcconfig + compression-level: 9 # maximum compression - run: | xcodebuild -showBuildSettings -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations bundle exec fastlane ios tests From a16c0793d0559818ed9112286d3e9eb8bb2d9c70 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 22:22:37 -0400 Subject: [PATCH 15/32] Try out alternate syntax for reading vars and secrets --- .github/workflows/ios.yml | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index d276f1c..5503804 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -18,27 +18,14 @@ jobs: brew bundle install bundler install - name: Set up xcconfig secrets (see README#quick-start) - env: - API_SECRET: ${{ secrets.API_SECRET }} - API_CLIENT_ID: ${{ secrets.API_CLIENT_ID }} - API_HOST: ${{ vars.API_HOST }} - API_PORT: ${{ vars.API_PORT }} - API_REDIRECT_URI: ${{ vars.API_REDIRECT_URI }} - DEVELOPMENT_TEAM: ${{ vars.DEVELOPMENT_TEAM }} - PRODUCT_BUNDLE_IDENTIFIER: ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }} run: | - echo "API_SECRET = $API_SECRET" >> BikeIndex-development.xcconfig - echo "API_CLIENT_ID = $API_CLIENT_ID" >> BikeIndex-development.xcconfig - echo "API_HOST = $API_HOST" >> BikeIndex-development.xcconfig - echo "API_PORT = $API_PORT" >> BikeIndex-development.xcconfig - echo "API_REDIRECT_URI = $API_REDIRECT_URI" >> BikeIndex-development.xcconfig - echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> BikeIndex-development.xcconfig - echo "PRODUCT_BUNDLE_IDENTIFIER = $PRODUCT_BUNDLE_IDENTIFIER" >> BikeIndex-development.xcconfig - - uses: actions/upload-artifact@v4 - with: - name: config - path: BikeIndex-development.xcconfig - compression-level: 9 # maximum compression + echo "API_SECRET = ${{ secrets.API_SECRET }}" >> BikeIndex-development.xcconfig + echo "API_CLIENT_ID = ${{ secrets.API_CLIENT_ID }}" >> BikeIndex-development.xcconfig + echo "API_HOST = ${{ vars.API_HOST }}" >> BikeIndex-development.xcconfig + echo "API_PORT = ${{ vars.API_PORT }}" >> BikeIndex-development.xcconfig + echo "API_REDIRECT_URI = ${{ vars.API_REDIRECT_URI }}" >> BikeIndex-development.xcconfig + echo "DEVELOPMENT_TEAM = ${{ vars.DEVELOPMENT_TEAM }}" >> BikeIndex-development.xcconfig + echo "PRODUCT_BUNDLE_IDENTIFIER = ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }}" >> BikeIndex-development.xcconfig - run: | xcodebuild -showBuildSettings -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations bundle exec fastlane ios tests From 0aa5e2af2642bd78358a0df642568ab7a0bb12c4 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 22:24:32 -0400 Subject: [PATCH 16/32] Try with artifact --- .github/workflows/ios.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 5503804..8f963c0 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -26,6 +26,10 @@ jobs: echo "API_REDIRECT_URI = ${{ vars.API_REDIRECT_URI }}" >> BikeIndex-development.xcconfig echo "DEVELOPMENT_TEAM = ${{ vars.DEVELOPMENT_TEAM }}" >> BikeIndex-development.xcconfig echo "PRODUCT_BUNDLE_IDENTIFIER = ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }}" >> BikeIndex-development.xcconfig + - uses: actions/upload-artifact@v4 + with: + name: config + path: BikeIndex-development.xcconfig - run: | xcodebuild -showBuildSettings -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations bundle exec fastlane ios tests From 26d7f4034077fe3096913bbf25476ca3b1d0a790 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 22:27:15 -0400 Subject: [PATCH 17/32] Restore earlier syntax --- .github/workflows/ios.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 8f963c0..7678529 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -18,14 +18,22 @@ jobs: brew bundle install bundler install - name: Set up xcconfig secrets (see README#quick-start) + env: + API_SECRET: ${{ secrets.API_SECRET }} + API_CLIENT_ID: ${{ secrets.API_CLIENT_ID }} + API_HOST: ${{ vars.API_HOST }} + API_PORT: ${{ vars.API_PORT }} + API_REDIRECT_URI: ${{ vars.API_REDIRECT_URI }} + DEVELOPMENT_TEAM: ${{ vars.DEVELOPMENT_TEAM }} + PRODUCT_BUNDLE_IDENTIFIER: ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }} run: | - echo "API_SECRET = ${{ secrets.API_SECRET }}" >> BikeIndex-development.xcconfig - echo "API_CLIENT_ID = ${{ secrets.API_CLIENT_ID }}" >> BikeIndex-development.xcconfig - echo "API_HOST = ${{ vars.API_HOST }}" >> BikeIndex-development.xcconfig - echo "API_PORT = ${{ vars.API_PORT }}" >> BikeIndex-development.xcconfig - echo "API_REDIRECT_URI = ${{ vars.API_REDIRECT_URI }}" >> BikeIndex-development.xcconfig - echo "DEVELOPMENT_TEAM = ${{ vars.DEVELOPMENT_TEAM }}" >> BikeIndex-development.xcconfig - echo "PRODUCT_BUNDLE_IDENTIFIER = ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }}" >> BikeIndex-development.xcconfig + echo "API_SECRET = $API_SECRET" >> BikeIndex-development.xcconfig + echo "API_CLIENT_ID = $API_CLIENT_ID" >> BikeIndex-development.xcconfig + echo "API_HOST = $API_HOST" >> BikeIndex-development.xcconfig + echo "API_PORT = $API_PORT" >> BikeIndex-development.xcconfig + echo "API_REDIRECT_URI = $API_REDIRECT_URI" >> BikeIndex-development.xcconfig + echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> BikeIndex-development.xcconfig + echo "PRODUCT_BUNDLE_IDENTIFIER = $PRODUCT_BUNDLE_IDENTIFIER" >> BikeIndex-development.xcconfig - uses: actions/upload-artifact@v4 with: name: config From 97fa9725ff06a5aef00ee498365053451ec72eec Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Fri, 11 Oct 2024 23:08:24 -0400 Subject: [PATCH 18/32] Try combined repository secret --- .github/workflows/ios.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 7678529..0db94dd 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -19,21 +19,9 @@ jobs: bundler install - name: Set up xcconfig secrets (see README#quick-start) env: - API_SECRET: ${{ secrets.API_SECRET }} - API_CLIENT_ID: ${{ secrets.API_CLIENT_ID }} - API_HOST: ${{ vars.API_HOST }} - API_PORT: ${{ vars.API_PORT }} - API_REDIRECT_URI: ${{ vars.API_REDIRECT_URI }} - DEVELOPMENT_TEAM: ${{ vars.DEVELOPMENT_TEAM }} - PRODUCT_BUNDLE_IDENTIFIER: ${{ vars.PRODUCT_BUNDLE_IDENTIFIER }} + BIKE_INDEX_DEVELOPMENT_XCCONFIG: ${{ secrets.BIKE_INDEX_DEVELOPMENT_XCCONFIG }} run: | - echo "API_SECRET = $API_SECRET" >> BikeIndex-development.xcconfig - echo "API_CLIENT_ID = $API_CLIENT_ID" >> BikeIndex-development.xcconfig - echo "API_HOST = $API_HOST" >> BikeIndex-development.xcconfig - echo "API_PORT = $API_PORT" >> BikeIndex-development.xcconfig - echo "API_REDIRECT_URI = $API_REDIRECT_URI" >> BikeIndex-development.xcconfig - echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> BikeIndex-development.xcconfig - echo "PRODUCT_BUNDLE_IDENTIFIER = $PRODUCT_BUNDLE_IDENTIFIER" >> BikeIndex-development.xcconfig + echo "$BIKE_INDEX_DEVELOPMENT_XCCONFIG" >> BikeIndex-development.xcconfig - uses: actions/upload-artifact@v4 with: name: config From adb0acb02649d675d129ca91ff82470bb36c4a75 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:08:59 -0400 Subject: [PATCH 19/32] TRYFIX: Attempt to add fastlane xcresult to upload-artifacts - Add fastlane context output for xcresult_path to GHA outputs - Store output for fastlane-ios-outputs.xcresult_path - Add "name" to various steps --- .github/workflows/ios.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 0db94dd..57bd00c 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -10,22 +10,29 @@ jobs: build: name: Run tests with fastlane runs-on: macos-15 - + outputs: + xcresult_path: ${{ steps.fastlane-ios-tests.outputs.xcresult_path }} steps: - name: Checkout uses: actions/checkout@v4 - - run: | + - name: Install tools + run: | brew bundle install bundler install - - name: Set up xcconfig secrets (see README#quick-start) + - name: Set up xcconfig secrets (see README.md#quick-start) env: BIKE_INDEX_DEVELOPMENT_XCCONFIG: ${{ secrets.BIKE_INDEX_DEVELOPMENT_XCCONFIG }} run: | echo "$BIKE_INDEX_DEVELOPMENT_XCCONFIG" >> BikeIndex-development.xcconfig + - name: List available simulators + run: xcodebuild -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations + - name: Run tests + id: fastlane-ios-tests + run: | + bundle exec fastlane ios tests + bundle exec fastlane run lane_context SCAN_GENERATED_XCRESULT_PATH >> $XCRESULT_PATH + echo "xcresult_path=$XCRESULT_PATH" >> "$GITHUB_OUTPUT" - uses: actions/upload-artifact@v4 with: - name: config - path: BikeIndex-development.xcconfig - - run: | - xcodebuild -showBuildSettings -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations - bundle exec fastlane ios tests + name: TestResult.xcresult + path: xcresult_path From 4b8a1c46d7e76093ac529b7ff40fa5f5d7c4e975 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:25:23 -0400 Subject: [PATCH 20/32] Rename upload-artifact to Upload xcresult --- .github/workflows/ios.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 57bd00c..150a722 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -32,7 +32,8 @@ jobs: bundle exec fastlane ios tests bundle exec fastlane run lane_context SCAN_GENERATED_XCRESULT_PATH >> $XCRESULT_PATH echo "xcresult_path=$XCRESULT_PATH" >> "$GITHUB_OUTPUT" - - uses: actions/upload-artifact@v4 + - name: Upload xcresult + uses: actions/upload-artifact@v4 with: name: TestResult.xcresult path: xcresult_path From 61709003eb80f5b4e56a24d261e5326770ff3179 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:26:55 -0400 Subject: [PATCH 21/32] Fix link between upload-xcresult and xcresult_path --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 150a722..e89055d 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -36,4 +36,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: TestResult.xcresult - path: xcresult_path + path: {{ needs.fastlane-ios-tests.outputs.xcresult_path }} From 5e426c4a9927f1fc1c0003dd34320eebfb49283b Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:33:57 -0400 Subject: [PATCH 22/32] Fix syntax --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index e89055d..23f0f55 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -36,4 +36,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: TestResult.xcresult - path: {{ needs.fastlane-ios-tests.outputs.xcresult_path }} + path: ${{ needs.fastlane-ios-tests.outputs.xcresult_path }} From 9e0321d710c4bfbd28dc8540a8b2f9f45a35ba19 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:43:51 -0400 Subject: [PATCH 23/32] Add in-step XCRESULT_PATH output for validation, add step to print output.xcresult_path --- .github/workflows/ios.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 23f0f55..d7e676a 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -32,6 +32,10 @@ jobs: bundle exec fastlane ios tests bundle exec fastlane run lane_context SCAN_GENERATED_XCRESULT_PATH >> $XCRESULT_PATH echo "xcresult_path=$XCRESULT_PATH" >> "$GITHUB_OUTPUT" + echo "$XCRESULT_PATH" + - name: Debug result path outputs + run: | + echo ${{ needs.fastlane-ios-tests.outputs.xcresult_path }} - name: Upload xcresult uses: actions/upload-artifact@v4 with: From 4e255839e322aabc1f476e29804a05a72d4aa3d6 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 21:05:47 -0400 Subject: [PATCH 24/32] Split tests and lane_context commands into separate steps - Tests failing caused lane_context writing to never occur --- .github/workflows/ios.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index d7e676a..60c3932 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -28,8 +28,9 @@ jobs: run: xcodebuild -scheme Debug\ \(development\) -project BikeIndex.xcodeproj -showdestinations - name: Run tests id: fastlane-ios-tests + run: bundle exec fastlane ios tests + - name: Find test output run: | - bundle exec fastlane ios tests bundle exec fastlane run lane_context SCAN_GENERATED_XCRESULT_PATH >> $XCRESULT_PATH echo "xcresult_path=$XCRESULT_PATH" >> "$GITHUB_OUTPUT" echo "$XCRESULT_PATH" From d6173efa8ea90708ef11926fe01ad8b8b3029e9f Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 21:44:29 -0400 Subject: [PATCH 25/32] Fix xcresult upload by using local directory constant --- .github/workflows/ios.yml | 10 +--------- fastlane/Fastfile | 3 ++- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 60c3932..7771384 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -29,16 +29,8 @@ jobs: - name: Run tests id: fastlane-ios-tests run: bundle exec fastlane ios tests - - name: Find test output - run: | - bundle exec fastlane run lane_context SCAN_GENERATED_XCRESULT_PATH >> $XCRESULT_PATH - echo "xcresult_path=$XCRESULT_PATH" >> "$GITHUB_OUTPUT" - echo "$XCRESULT_PATH" - - name: Debug result path outputs - run: | - echo ${{ needs.fastlane-ios-tests.outputs.xcresult_path }} - name: Upload xcresult uses: actions/upload-artifact@v4 with: name: TestResult.xcresult - path: ${{ needs.fastlane-ios-tests.outputs.xcresult_path }} + path: "fastlane/test_output/Debug (development).xcresult" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0fa6a4f..ff06eb3 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -21,6 +21,7 @@ platform :ios do run_tests(project: "BikeIndex.xcodeproj", devices: ["iPhone 16", "iPhone 16 Plus", "iPad (10th generation)"], - scheme: "Debug (development)") + scheme: "Debug (development)", + result_bundle: true) end end From 12b5ec2c459ce42c839da5ac40100cf276279a02 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 21:57:04 -0400 Subject: [PATCH 26/32] Fix uses: actions/upload-artifact syntax --- .github/workflows/ios.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 7771384..88cc0a7 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -29,8 +29,8 @@ jobs: - name: Run tests id: fastlane-ios-tests run: bundle exec fastlane ios tests - - name: Upload xcresult - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v4 with: name: TestResult.xcresult path: "fastlane/test_output/Debug (development).xcresult" + compression-level: 9 # maximum compression From 14a3e589ea85d7613adbb5a44ee5b3f8f9568965 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 22:17:20 -0400 Subject: [PATCH 27/32] Change artifact path to whole directory --- .github/workflows/ios.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 88cc0a7..45251a6 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -10,8 +10,6 @@ jobs: build: name: Run tests with fastlane runs-on: macos-15 - outputs: - xcresult_path: ${{ steps.fastlane-ios-tests.outputs.xcresult_path }} steps: - name: Checkout uses: actions/checkout@v4 @@ -32,5 +30,5 @@ jobs: - uses: actions/upload-artifact@v4 with: name: TestResult.xcresult - path: "fastlane/test_output/Debug (development).xcresult" + path: "fastlane/test_output/" compression-level: 9 # maximum compression From 3723a45ecbbd64f912656b54bfadb848809bf316 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 22:25:01 -0400 Subject: [PATCH 28/32] Change upload-artifact to wildcard --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 45251a6..9aa7bb6 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -30,5 +30,5 @@ jobs: - uses: actions/upload-artifact@v4 with: name: TestResult.xcresult - path: "fastlane/test_output/" + path: "fastlane/test_output/*" compression-level: 9 # maximum compression From 60332696e09c938cfec3d7ac801ea311b43dbe22 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 22:25:35 -0400 Subject: [PATCH 29/32] pwd --- .github/workflows/ios.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 9aa7bb6..f45a1db 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -27,6 +27,7 @@ jobs: - name: Run tests id: fastlane-ios-tests run: bundle exec fastlane ios tests + - run: pwd - uses: actions/upload-artifact@v4 with: name: TestResult.xcresult From 8a39539b5e3bb4e1d91ee1510c14048c998224f8 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 22:37:31 -0400 Subject: [PATCH 30/32] Add always directive to reporting steps --- .github/workflows/ios.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index f45a1db..db624b6 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -28,7 +28,9 @@ jobs: id: fastlane-ios-tests run: bundle exec fastlane ios tests - run: pwd + if: always() - uses: actions/upload-artifact@v4 + if: always() with: name: TestResult.xcresult path: "fastlane/test_output/*" From 05be53959bcd7a8bbbeb7fe86e880e0b9431acd3 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 23:03:45 -0400 Subject: [PATCH 31/32] Clean up pwd command, rename test_output --- .github/workflows/ios.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index db624b6..4109223 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -27,11 +27,9 @@ jobs: - name: Run tests id: fastlane-ios-tests run: bundle exec fastlane ios tests - - run: pwd - if: always() - uses: actions/upload-artifact@v4 if: always() with: - name: TestResult.xcresult + name: test_output.zip path: "fastlane/test_output/*" compression-level: 9 # maximum compression From 9772da8e6843247aa4e8185a738fc9d03c099ea7 Mon Sep 17 00:00:00 2001 From: Jack Alto <384288+aokj4ck@users.noreply.github.com> Date: Sat, 12 Oct 2024 23:15:23 -0400 Subject: [PATCH 32/32] Fix simulator OS version configurations --- fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index ff06eb3..4596fae 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -19,8 +19,8 @@ platform :ios do desc "Run unit tests" lane :tests do run_tests(project: "BikeIndex.xcodeproj", - devices: ["iPhone 16", "iPhone 16 Plus", - "iPad (10th generation)"], + devices: ["iPhone 16 (18.0)", "iPhone 16 Plus (18.0)", + "iPad (10th generation) (18.0)"], scheme: "Debug (development)", result_bundle: true) end