fastlane/Fastfile
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
before_all do
sh 'mkdir ../reports || true'
end
desc "Lint the project - .swiftlint.yml"
lane :lint do
swiftlint(
mode: :lint,
output_file: './reports/swiftlint.txt',
config_file: '.swiftlint.yml'
)
end
desc "buil and test the project - .swiftlint.yml"
lane :build_and_test do
# Run tests
scan({
workspace: ENV["WORKSPACE"],
scheme: ENV["SCHEME"],
cloned_source_packages_path: "SourcePackages"
clean: true,
code_coverage: true,
output_types: "html, junit",
devices: [
"iPhone 11 (13.2)",
],
})
# Generate code coverage report
slather_ignore = ['ExamplePodCode/*', 'ProjectTestsGroup/*']
slather({
scheme: ENV["SCHEME"],
proj: ENV["PROJECT"],
workspace: ENV["WORKSPACE"],
coveralls: true,
ignore: slather_ignore,
output_directory: "./coverage"
})
end
end