Fastlane: Add a lane for tests

This commit is contained in:
manuroe 2021-04-20 16:10:37 +02:00
parent a9dcfce626
commit 5286164d23

View file

@ -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"