Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple committed Nov 12, 2024
1 parent 71e54b8 commit 9888235
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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 &")
Expand Down

0 comments on commit 9888235

Please sign in to comment.