From b885c84f3798afce9001d577467073d1121034c7 Mon Sep 17 00:00:00 2001 From: Theo Spears Date: Sun, 7 Jan 2024 20:00:59 -0800 Subject: [PATCH] Upload fastlane log artifacts (#427) Update fastlane tests to collect and upload build logs as an artifact. These can the be manually downloaded to help debug build failures in CI. Testing: Verified that an artifact was created and had expected contents --- .github/workflows/fastlane-tests.yml | 6 ++++++ fastlane/Fastfile | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fastlane-tests.yml b/.github/workflows/fastlane-tests.yml index ff530ebf5..f30367ade 100644 --- a/.github/workflows/fastlane-tests.yml +++ b/.github/workflows/fastlane-tests.yml @@ -21,6 +21,12 @@ jobs: bundler-cache: true - name: Run tests run: bundle exec fastlane test + - name: Upload report + uses: actions/upload-artifact@v4 + if: always() # always run even if the previous step fails + with: + name: test-output + path: fastlane/test_output - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: always() # always run even if the previous step fails diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 3abb807f3..91108cbb0 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -17,7 +17,13 @@ default_platform(:ios) platform :ios do lane :test do - run_tests(scheme: "BeeSwift") + run_tests( + scheme: "BeeSwift", + reset_simulator: true, + include_simulator_logs: true, + buildlog_path: "fastlane/test_output", + xcodebuild_formatter: "xcpretty", + ) end lane :build do build_app(scheme: "BeeSwift")