fastlane-plugin-android_testlab_script_swit 0.1.55 → 0.1.56

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9004fa6d414e6dec77f35475ae343e77fa9e814c9e0e9dbe1d9eac7b0e0e1163
4
- data.tar.gz: 251832b088918466d1199d0b991a32241e7c77b6a5762471473ef00b4a95bf09
3
+ metadata.gz: 1a0cb519a581fdb838d46a9eaad40c34bafb17157c929dcad06298b7338814ca
4
+ data.tar.gz: a43280f1c56cf7880ac1f3b06aed5b642ccc9e3c70c86adf167bf0f1d5a5ee64
5
5
  SHA512:
6
- metadata.gz: e2364143d2709f9bc5b79c5fcbd3573d20778a1010cb3d4292cb0b6cc35cab0c5f6869dc68114d9c2f3403ae21c42890c6f7c371a2199e4b80dff3f4d0bd0f6c
7
- data.tar.gz: 54d27ea2f82d42a6b343e666574c63f36224e24206aa676c3e4344ec431a498776dd974e3bf0d54b11cf1e644da83dd5f666bd4f86de44c1a7eff52c39242545
6
+ metadata.gz: dff532fcccc6e2136aa1b7e80fe41df45b115755911d31b7370ce6d1cbb1aab34f3622e2e8999b2a22404c0bcee7932401fa9b24c329fc542708b2c95d8dce8f
7
+ data.tar.gz: 968e48feb9a5ad8434d520cfd24d3bebd55bb1ead4f0272d1ce94250bccea7274da7b063828fdf3411549bd619f137bf3259349f64a0337774871382a4cabac0
@@ -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
- json = JSON.parse(File.read(params[:console_log_file_name]))
43
- UI.message("Test status: #{json}")
44
-
45
-
46
- # Fetch results
47
- download_dir = params[:download_dir]
48
- if download_dir
49
- UI.message("Fetch results from Firebase Test Lab results bucket")
50
- json.each do |status|
51
- axis = status["axis_value"]
52
- Helper.if_need_dir("#{download_dir}/#{axis}")
53
- Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
54
- Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
55
- end
56
- end
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
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.55"
3
+ VERSION = "0.1.56"
4
4
  end
5
5
  end
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.55
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-26 00:00:00.000000000 Z
11
+ date: 2023-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler