mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Fastlane: Add a lane for tests
This commit is contained in:
parent
a9dcfce626
commit
5286164d23
1 changed files with 27 additions and 0 deletions
|
@ -79,6 +79,33 @@ platform :ios do
|
|||
)
|
||||
end
|
||||
|
||||
desc "Run tests"
|
||||
lane :test do
|
||||
xcodegen(spec: "project.yml")
|
||||
cocoapods
|
||||
|
||||
opts = {
|
||||
:clean => true,
|
||||
:scheme => "Riot",
|
||||
:workspace => "Riot.xcworkspace",
|
||||
:configuration => "Debug",
|
||||
:code_coverage => true,
|
||||
# Test result configuration
|
||||
:result_bundle => true,
|
||||
:output_directory => "./build/test",
|
||||
:open_report => !is_ci?
|
||||
}
|
||||
begin
|
||||
scan(opts)
|
||||
ensure
|
||||
Dir.chdir("../#{opts[:output_directory]}") do
|
||||
xcresult = "#{opts[:scheme]}.xcresult"
|
||||
sh("zip", "-r", "#{xcresult}.zip", xcresult)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#### Private ####
|
||||
|
||||
desc "Download App Store or Ad-Hoc provisioning profiles"
|
||||
|
|
Loading…
Reference in a new issue