Skip to content

Commit

Permalink
Merge branch 'master' into ci-use-newerxcode
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa authored Dec 10, 2023
2 parents 8c484d5 + de124e1 commit 1450d3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 29 deletions.
28 changes: 3 additions & 25 deletions Fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
XC_PROJECT = File.absolute_path('../WebDriverAgent.xcodeproj')
RETRIES = 3

lane :test do
test_run_block = lambda do |testrun_info|
failed_test_count = testrun_info[:failed].size

if failed_test_count > 0
UI.important("Failed tests count: #{failed_test_count}")

try_attempt = testrun_info[:try_count]
if try_attempt < RETRIES
UI.header("Re-running failing tests (attempt #{try_attempt} of #{RETRIES})")
reset_simulator_contents
end
end
end

# https://docs.fastlane.tools/actions/scan/
result = multi_scan(
run_tests(
project: XC_PROJECT,
try_count: RETRIES,
fail_build: false,
fail_build: true,
scheme: ENV['SCHEME'],
sdk: ENV['SDK'],
destination: ENV['DEST'],
testrun_completed_block: test_run_block
)
unless result[:failed_testcount].zero?
msg = "There are #{result[:failed_testcount]} legitimate failing tests"
UI.message(msg)
raise msg
end
end
end
2 changes: 0 additions & 2 deletions Fastlane/Pluginfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-test_center', '3.19.1'
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source "https://rubygems.org"

gem "fastlane", '2.217.0'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

0 comments on commit 1450d3e

Please sign in to comment.