fastlane-plugin-android_testlab_script_swit 0.1.54 → 0.1.56
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 +4 -4
- data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb +38 -15
- data/lib/fastlane/plugin/android_testlab_script_swit/helper/android_testlab_script_swit_helper.rb +0 -8
- data/lib/fastlane/plugin/android_testlab_script_swit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a0cb519a581fdb838d46a9eaad40c34bafb17157c929dcad06298b7338814ca
|
4
|
+
data.tar.gz: a43280f1c56cf7880ac1f3b06aed5b642ccc9e3c70c86adf167bf0f1d5a5ee64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dff532fcccc6e2136aa1b7e80fe41df45b115755911d31b7370ce6d1cbb1aab34f3622e2e8999b2a22404c0bcee7932401fa9b24c329fc542708b2c95d8dce8f
|
7
|
+
data.tar.gz: 968e48feb9a5ad8434d520cfd24d3bebd55bb1ead4f0272d1ce94250bccea7274da7b063828fdf3411549bd619f137bf3259349f64a0337774871382a4cabac0
|
data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb
CHANGED
@@ -2,6 +2,7 @@ require 'fastlane/action'
|
|
2
2
|
require 'json'
|
3
3
|
require 'fileutils'
|
4
4
|
require 'open-uri'
|
5
|
+
require 'httparty'
|
5
6
|
|
6
7
|
module Fastlane
|
7
8
|
module Actions
|
@@ -39,21 +40,43 @@ module Fastlane
|
|
39
40
|
"--format=json 1>#{Helper.if_need_dir(params[:console_log_file_name])}"
|
40
41
|
)
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
#
|
46
|
-
|
47
|
-
#
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
#
|
53
|
-
|
54
|
-
|
55
|
-
#
|
56
|
-
#
|
43
|
+
json = JSON.parse(File.read(params[:console_log_file_name]))
|
44
|
+
UI.message("Test status: #{json}")
|
45
|
+
|
46
|
+
# 각 JSON 객체에 대해 반복
|
47
|
+
json.each do |item|
|
48
|
+
# 정보 추출하기
|
49
|
+
axis_value = item["axis_value"]
|
50
|
+
outcome = item["outcome"]
|
51
|
+
test_details = item["test_details"]
|
52
|
+
|
53
|
+
# 'axis_value' 분리하기
|
54
|
+
parts = axis_value.split('-')
|
55
|
+
|
56
|
+
# 출력하기
|
57
|
+
UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
|
58
|
+
|
59
|
+
parts.each_with_index do |part, index|
|
60
|
+
UI.message("Part #{index + 1}: #{part}")
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
# Fetch results
|
66
|
+
download_dir = params[:download_dir]
|
67
|
+
if download_dir
|
68
|
+
UI.message("Fetch results from Firebase Test Lab results bucket")
|
69
|
+
json.each do |status|
|
70
|
+
axis = status["axis_value"]
|
71
|
+
Helper.if_need_dir("#{download_dir}/#{axis}")
|
72
|
+
Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
|
73
|
+
Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
# Swit Message
|
79
|
+
HTTParty.post(params[:swit_webhook_url, body: params[:swit_webhook_payload, headers: { 'Content-Type' => 'application/json' })
|
57
80
|
|
58
81
|
UI.message("Finish Action")
|
59
82
|
end
|
data/lib/fastlane/plugin/android_testlab_script_swit/helper/android_testlab_script_swit_helper.rb
CHANGED
@@ -34,14 +34,6 @@ module Fastlane
|
|
34
34
|
|
35
35
|
def self.run_tests(gcloud_components_channel, arguments)
|
36
36
|
UI.message("Test running...")
|
37
|
-
|
38
|
-
# 커스텀 2
|
39
|
-
# Action.sh("set +e; gcloud #{gcloud_components_channel} firebase test android run #{arguments}; set -e")
|
40
|
-
|
41
|
-
# 커스텀 1
|
42
|
-
# Action.sh("set +e; gcloud#{' ' + gcloud_components_channel unless gcloud_components_channel == "stable"} firebase test android run #{arguments}; set -e")
|
43
|
-
|
44
|
-
# 원본
|
45
37
|
Action.sh("set +e; gcloud #{gcloud_components_channel unless gcloud_components_channel == "stable"} firebase test android run #{arguments}; set -e")
|
46
38
|
end
|
47
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-android_testlab_script_swit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 나비이쁜이
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|