-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71e54b8
commit 9888235
Showing
1 changed file
with
2 additions
and
6 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 |
---|---|---|
|
@@ -10,6 +10,7 @@ test_flavor = 'stream-chat-android-compose-sample' | |
androidx_test_orchestrator_version = '1.5.1' | ||
androidx_test_services_version = '1.5.0' | ||
mock_server_driver_port = 4567 | ||
is_localhost = !is_ci | ||
@force_check = false | ||
|
||
before_all do |lane| | ||
|
@@ -24,16 +25,11 @@ after_all do |lane| | |
end | ||
|
||
lane :start_mock_server do | ||
stop_mock_server if is_localhost | ||
mock_server_repo = 'stream-chat-test-mock-server' | ||
sh("rm -rf #{mock_server_repo}") if File.directory?(mock_server_repo) | ||
sh("git clone [email protected]:#{github_repo.split('/').first}/#{mock_server_repo}.git") | ||
|
||
if RbConfig::CONFIG['host_os'] =~ /darwin|mac/ | ||
sh("lsof -t -i:#{mock_server_driver_port} | xargs kill -9") | ||
else | ||
sh("fuser -k #{mock_server_driver_port}/tcp") | ||
end | ||
|
||
Dir.chdir(mock_server_repo) do | ||
FileUtils.mkdir_p('logs') | ||
sh("bundle exec ruby driver.rb > logs/driver.log 2>&1 &") | ||
|