forked from facebookarchive/WebDriverAgent
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: use ruby 3 * set output type to not use result bundle * try no multi_scan * adjust params * ci: make build fail when test fails
- Loading branch information
Showing
4 changed files
with
5 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.15.3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "fastlane", '2.162.0' | ||
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') | ||
eval_gemfile(plugins_path) if File.exist?(plugins_path) | ||
gem "fastlane", '2.217.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters