fastlane-plugin-try_scan 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +12 -2
- data/lib/fastlane/plugin/try_scan/actions/try_scan_action.rb +8 -0
- data/lib/fastlane/plugin/try_scan/helper/scan_helper.rb +21 -0
- data/lib/fastlane/plugin/try_scan/helper/try_scan_runner.rb +6 -0
- data/lib/fastlane/plugin/try_scan/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8dbabd07feebaef1f230a9c2afd3dd991a3a3de7
|
4
|
+
data.tar.gz: ed9495eec01b730ab3476c7c76ddd935fe573e6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8741546e7347f4f8f7e92c80c7543a9453b72e2a597f0a400168490e6e78709a31ebf99a196037021053bcae05cee765a0326a7d4847c06aed225cb0701b42c2
|
7
|
+
data.tar.gz: 331ac99fbcda25606b17ef06c19bb8f32227213ba146511f719b5dc94abcf6b5183c834fc1803e61ed95d662170b720ac27e9335f9d0b1870d6cf14453c42e69
|
data/README.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## Important Announcement ⚠️
|
2
|
+
|
3
|
+
**Xcode 13** provides test repetitions out of the box. For more details check out [WWDC21](https://developer.apple.com/videos/play/wwdc2021/10296).
|
4
|
+
|
5
|
+
---
|
6
|
+
|
1
7
|
# try_scan plugin
|
2
8
|
|
3
9
|
[](https://rubygems.org/gems/fastlane-plugin-try_scan)
|
@@ -16,6 +22,7 @@ Under the hood `try_scan` uses official [`fastlane scan action`](https://docs.fa
|
|
16
22
|
| parallel_workers | Specify the exact number of test runners that will be spawned during parallel testing. Equivalent to `-parallel-testing-worker-count` and `concurrent_workers` | |
|
17
23
|
| retry_build | Should building be retried after failure? | false |
|
18
24
|
| retry_strategy | What would you like to retry after failure: test, class or suite? | test |
|
25
|
+
| backup | Back up an output of each execution to a separate folder | false |
|
19
26
|
|
20
27
|
## Requirements
|
21
28
|
|
@@ -34,7 +41,10 @@ $ fastlane add_plugin try_scan
|
|
34
41
|
```ruby
|
35
42
|
try_scan(
|
36
43
|
workspace: "Example.xcworkspace",
|
37
|
-
|
38
|
-
try_count: 3
|
44
|
+
device: "iPhone 11 Pro Max",
|
45
|
+
try_count: 3,
|
46
|
+
parallel_workers: 2,
|
47
|
+
try_parallel: true,
|
48
|
+
retry_parallel: false
|
39
49
|
)
|
40
50
|
```
|
@@ -85,6 +85,14 @@ module Fastlane
|
|
85
85
|
possible_strategies = ['test', 'class', 'suite']
|
86
86
|
UI.user_error!("Error: :retry_strategy must equal to one of the following values: #{possible_strategies}") unless possible_strategies.include?(strategy)
|
87
87
|
end
|
88
|
+
),
|
89
|
+
FastlaneCore::ConfigItem.new(
|
90
|
+
key: :backup,
|
91
|
+
env_name: "FL_TRY_SCAN_BACKUP",
|
92
|
+
description: "Back up an output of each execution to a separate folder",
|
93
|
+
is_string: false,
|
94
|
+
optional: true,
|
95
|
+
default_value: false
|
88
96
|
)
|
89
97
|
]
|
90
98
|
end
|
@@ -66,6 +66,27 @@ module TryScanManager
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
69
|
+
|
70
|
+
def self.backup_output_folder(attempt)
|
71
|
+
output_files = report_options.instance_variable_get(:@output_files)
|
72
|
+
output_directory = report_options.instance_variable_get(:@output_directory)
|
73
|
+
|
74
|
+
unless output_files.empty?
|
75
|
+
FastlaneCore::UI.verbose("Back up an output folder")
|
76
|
+
backup = "#{output_directory}_#{attempt}"
|
77
|
+
FileUtils.mkdir_p(backup)
|
78
|
+
FileUtils.copy_entry(output_directory, backup)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.clean_up_backup
|
83
|
+
output_directory = report_options.instance_variable_get(:@output_directory)
|
84
|
+
|
85
|
+
Dir["#{output_directory}_*"].each do |backup|
|
86
|
+
FastlaneCore::UI.verbose("Removing backup: #{backup}")
|
87
|
+
FileUtils.rm_rf(backup)
|
88
|
+
end
|
89
|
+
end
|
69
90
|
end
|
70
91
|
end
|
71
92
|
end
|
@@ -11,6 +11,7 @@ module TryScanManager
|
|
11
11
|
def run
|
12
12
|
configure_xcargs
|
13
13
|
prepare_scan_config(@options)
|
14
|
+
FastlaneScanHelper.clean_up_backup
|
14
15
|
print_summary
|
15
16
|
@attempt = 1
|
16
17
|
begin
|
@@ -22,6 +23,7 @@ module TryScanManager
|
|
22
23
|
rescue FastlaneCore::Interface::FastlaneTestFailure => _
|
23
24
|
failed_tests = failed_tests_from_xcresult_report
|
24
25
|
print_try_scan_result(failed_tests_count: failed_tests.size)
|
26
|
+
backup_output_folder if @options[:backup]
|
25
27
|
return false if finish?
|
26
28
|
|
27
29
|
@attempt += 1
|
@@ -193,5 +195,9 @@ module TryScanManager
|
|
193
195
|
def tests_count_from_xcresult_report
|
194
196
|
parse_xcresult_report['metrics']['testsCount']['_value']
|
195
197
|
end
|
198
|
+
|
199
|
+
def backup_output_folder
|
200
|
+
FastlaneScanHelper.backup_output_folder(@attempt)
|
201
|
+
end
|
196
202
|
end
|
197
203
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-try_scan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Alter-Pesotskiy
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 2.144.0
|
125
|
-
description:
|
125
|
+
description:
|
126
126
|
email: a.alterpesotskiy@mail.ru
|
127
127
|
executables: []
|
128
128
|
extensions: []
|
@@ -140,7 +140,7 @@ licenses:
|
|
140
140
|
- MIT
|
141
141
|
metadata:
|
142
142
|
allowed_push_host: https://rubygems.org
|
143
|
-
post_install_message:
|
143
|
+
post_install_message:
|
144
144
|
rdoc_options: []
|
145
145
|
require_paths:
|
146
146
|
- lib
|
@@ -155,8 +155,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
|
-
|
159
|
-
|
158
|
+
rubyforge_project:
|
159
|
+
rubygems_version: 2.6.8
|
160
|
+
signing_key:
|
160
161
|
specification_version: 4
|
161
162
|
summary: The easiest way to retry your fastlane scan action
|
162
163
|
test_files: []
|