allure-report-publisher 0.5.4 → 0.6.0
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/allure_report_publisher/commands/upload.rb +6 -1
- data/lib/allure_report_publisher/lib/helpers/url_section_builder.rb +13 -7
- data/lib/allure_report_publisher/lib/providers/_provider.rb +6 -3
- data/lib/allure_report_publisher/lib/uploaders/_uploader.rb +23 -10
- data/lib/allure_report_publisher/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd838b870583e0c460f851a46db5be91f1d3c12c7fa6eea246a62dc957332403
|
4
|
+
data.tar.gz: 56ad43ca79094900b54540668b6402f6aef4e1489f8ff0efcac9535cc1e2223f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20c29d89dba50857eeefbd18ca77e0cf7640a9c23cdf8ce2387f5fe7db682b117a55ad8f75b0a211ce26490c8b8bcb562e16b1d0b211e2bdd8bc18715a8bbafd
|
7
|
+
data.tar.gz: f0af3cc2833eda0b1decbb9d4de665b1781c3b54396edc866224cb2f170dcda52f9c91760d83b9b3fca17ee6373c8e4d76a5853beb5ba9c7bbb81aed939e6c9d
|
@@ -32,6 +32,10 @@ module Publisher
|
|
32
32
|
Publisher::Helpers::Summary::PACKAGES,
|
33
33
|
Publisher::Helpers::Summary::TOTAL
|
34
34
|
]
|
35
|
+
option :collapse_summary,
|
36
|
+
type: :boolean,
|
37
|
+
default: false,
|
38
|
+
desc: "Create summary as a collapsable section"
|
35
39
|
option :copy_latest,
|
36
40
|
type: :boolean,
|
37
41
|
default: false,
|
@@ -83,7 +87,8 @@ module Publisher
|
|
83
87
|
:bucket,
|
84
88
|
:prefix,
|
85
89
|
:copy_latest,
|
86
|
-
:update_pr
|
90
|
+
:update_pr,
|
91
|
+
:collapse_summary
|
87
92
|
)
|
88
93
|
)
|
89
94
|
end
|
@@ -13,12 +13,14 @@ module Publisher
|
|
13
13
|
# @param [String] build_name
|
14
14
|
# @param [String] sha_url
|
15
15
|
# @param [String] summary_type
|
16
|
-
|
17
|
-
|
18
|
-
@
|
19
|
-
@
|
20
|
-
@
|
21
|
-
@
|
16
|
+
# @param [String] collapse_summary
|
17
|
+
def initialize(**args)
|
18
|
+
@report_url = args[:report_url]
|
19
|
+
@report_path = args[:report_path]
|
20
|
+
@build_name = args[:build_name]
|
21
|
+
@sha_url = args[:sha_url]
|
22
|
+
@summary_type = args[:summary_type]
|
23
|
+
@collapse_summary = args[:collapse_summary]
|
22
24
|
end
|
23
25
|
|
24
26
|
# Matches url section pattern
|
@@ -59,7 +61,8 @@ module Publisher
|
|
59
61
|
:report_path,
|
60
62
|
:build_name,
|
61
63
|
:sha_url,
|
62
|
-
:summary_type
|
64
|
+
:summary_type,
|
65
|
+
:collapse_summary
|
63
66
|
|
64
67
|
private
|
65
68
|
|
@@ -84,7 +87,10 @@ module Publisher
|
|
84
87
|
@job_entry ||= begin
|
85
88
|
entry = ["<!-- #{build_name} -->"]
|
86
89
|
entry << "**#{build_name}**: #{summary.status} [test report](#{report_url}) for #{sha_url}"
|
90
|
+
entry << "<details>" if collapse_summary
|
91
|
+
entry << "<summary>expand test summary</summary>\n" if collapse_summary
|
87
92
|
entry << "```markdown\n#{summary.table}\n```" if summary_type
|
93
|
+
entry << "</details>" if collapse_summary
|
88
94
|
entry << "<!-- #{build_name} -->"
|
89
95
|
|
90
96
|
entry.join("\n")
|
@@ -19,11 +19,12 @@ module Publisher
|
|
19
19
|
#
|
20
20
|
# @param [String] report_url
|
21
21
|
# @param [Boolean] update_pr
|
22
|
-
def initialize(report_url:, report_path:, update_pr:, summary_type:)
|
22
|
+
def initialize(report_url:, report_path:, update_pr:, summary_type:, collapse_summary:)
|
23
23
|
@report_url = report_url
|
24
24
|
@report_path = report_path
|
25
25
|
@update_pr = update_pr
|
26
26
|
@summary_type = summary_type
|
27
|
+
@collapse_summary = collapse_summary
|
27
28
|
end
|
28
29
|
|
29
30
|
# :nocov:
|
@@ -67,7 +68,8 @@ module Publisher
|
|
67
68
|
attr_reader :report_url,
|
68
69
|
:report_path,
|
69
70
|
:update_pr,
|
70
|
-
:summary_type
|
71
|
+
:summary_type,
|
72
|
+
:collapse_summary
|
71
73
|
|
72
74
|
# Current pull request description
|
73
75
|
#
|
@@ -128,7 +130,8 @@ module Publisher
|
|
128
130
|
report_path: report_path,
|
129
131
|
build_name: build_name,
|
130
132
|
sha_url: sha_url,
|
131
|
-
summary_type: summary_type
|
133
|
+
summary_type: summary_type,
|
134
|
+
collapse_summary: collapse_summary
|
132
135
|
)
|
133
136
|
end
|
134
137
|
end
|
@@ -19,13 +19,24 @@ module Publisher
|
|
19
19
|
"retry-trend.json"
|
20
20
|
].freeze
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
# Uploader instance
|
23
|
+
#
|
24
|
+
# @param [Hash] args
|
25
|
+
# @option args [String] :results_glob
|
26
|
+
# @option args [String] :bucket
|
27
|
+
# @option args [String] :prefix
|
28
|
+
# @option args [Boolean] :update_pr
|
29
|
+
# @option args [String] :summary_type
|
30
|
+
# @option args [Boolean] :collapse_summary
|
31
|
+
# @option args [String] :copy_latest
|
32
|
+
def initialize(**args)
|
33
|
+
@results_glob = args[:results_glob]
|
34
|
+
@bucket_name = args[:bucket]
|
35
|
+
@prefix = args[:prefix]
|
36
|
+
@update_pr = args[:update_pr]
|
37
|
+
@summary_type = args[:summary_type]
|
38
|
+
@copy_latest = (Providers.provider && args[:copy_latest]) # copy latest for ci only
|
39
|
+
@collapse_summary = args[:collapse_summary]
|
29
40
|
end
|
30
41
|
|
31
42
|
# Execute allure report generation and upload
|
@@ -87,7 +98,8 @@ module Publisher
|
|
87
98
|
:prefix,
|
88
99
|
:update_pr,
|
89
100
|
:copy_latest,
|
90
|
-
:summary_type
|
101
|
+
:summary_type,
|
102
|
+
:collapse_summary
|
91
103
|
|
92
104
|
def_delegators :report_generator, :results_path, :report_path
|
93
105
|
|
@@ -154,7 +166,7 @@ module Publisher
|
|
154
166
|
#
|
155
167
|
# @return [String]
|
156
168
|
def full_prefix
|
157
|
-
@full_prefix ||= [prefix, run_id].compact.
|
169
|
+
@full_prefix ||= [prefix, run_id].compact.then do |pre|
|
158
170
|
break if pre.empty?
|
159
171
|
|
160
172
|
pre.join("/")
|
@@ -187,7 +199,8 @@ module Publisher
|
|
187
199
|
report_url: report_url,
|
188
200
|
report_path: report_path,
|
189
201
|
update_pr: update_pr,
|
190
|
-
summary_type: summary_type
|
202
|
+
summary_type: summary_type,
|
203
|
+
collapse_summary: collapse_summary
|
191
204
|
)
|
192
205
|
end
|
193
206
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-report-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -387,7 +387,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
387
387
|
requirements:
|
388
388
|
- - ">="
|
389
389
|
- !ruby/object:Gem::Version
|
390
|
-
version: 2.
|
390
|
+
version: 2.7.0
|
391
391
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
392
392
|
requirements:
|
393
393
|
- - ">="
|