-
Notifications
You must be signed in to change notification settings - Fork 13
/
Fastfile
72 lines (55 loc) · 2.26 KB
/
Fastfile
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.221.1"
default_platform :android
platform :android do
before_all do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
end
lane :primary do
lint
unit_test
end
desc "Lint debug variant"
lane :lint do
gradle(task: ":app:lintDebug")
if is_ci
# Copy lint report to artifact directory. This will show up on the "Apps & Artifacts tab on the build page"
sh("cp $FASTLANE_WORK_DIR/../app/build/reports/lint-results-debug.html $BITRISE_DEPLOY_DIR/app-lint-results-debug.html")
end
end
desc "Run unit tests on debug variant"
lane :unit_test do
gradle(task: ":app:testDebugUnitTest")
if is_ci
# Copy test results to artifact directory. These will show up on the "Apps & Artifacts tab on the build page"
sh("zip -r $BITRISE_DEPLOY_DIR/app-tests-html.zip $FASTLANE_WORK_DIR/../app/build/reports/tests")
sh("zip -r $BITRISE_DEPLOY_DIR/app-tests-xml.zip $FASTLANE_WORK_DIR/../app/build/test-results")
end
end
# You can define as many lanes as you want
after_all do |lane|
# This block is called, only if the executed lane was successful
# slack(
# message: "Successfully deployed new App Update."
# )
end
error do |lane, exception|
# slack(
# message: exception.message,
# success: false
# )
end
end
# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# fastlane reports which actions are used
# No personal data is sent or shared. Learn more at https://github.com/fastlane/enhancer