-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
57 lines (46 loc) · 1.22 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
require 'colorize'
require 'cucumber/rake/task'
require_relative 'lib/app_paths'
require_relative 'lib/build_action'
require_relative 'lib/x_code_build_action'
require_relative 'lib/appium_server'
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = %w{--format pretty}
end
task :notify_build_succeeded do
puts '*** BUILD SUCCEEDED ***'.green.bold
end
desc 'Opens XCode'
task :xcode do
`open #{AppPaths.workspace_file}`
end
desc 'Clean the build'
task :clean do
XCodeBuildAction.new(:clean).execute!
BuildAction.execute!("rm -r -f #{AppPaths.dst_root}")
end
desc 'Run XCode unit-tests'
task :xc_unit_tests do
XCodeBuildAction.new(:test).execute!
end
desc 'Build everything'
task :build do
XCodeBuildAction.new(:build).execute!
end
desc 'Install build'
task :install do
XCodeBuildAction.new(:install).execute!
end
desc 'Run all tests'
task :test => [:clean, :check_appium_server, :xc_unit_tests, :install, :cucumber, :notify_build_succeeded] do
end
desc 'checks appium-server'
task :check_appium_server do
unless AppiumServer.is_running?
message = "Appium-Server is not running. Start Appium-Server with 'appium'"
puts message.red.bold
raise StandardError.new message
end
end
task :default => [:test] do
end