danger-rcov 2.0.5 → 3.0.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/README.md +9 -3
- data/danger-rcov.gemspec +3 -3
- data/lib/rcov/gem_version.rb +1 -1
- data/lib/rcov/plugin.rb +61 -38
- data/spec/support/fixtures/tree_ci.json +64 -64
- metadata +8 -9
- data/.circleci/config.yml +0 -77
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b0c2a61a6e5f81b2c13443b7a1373d3597de61448fa964dc7807d14cf1d004b
|
4
|
+
data.tar.gz: dc4d4d4a28e62f74472fd497057779b89e3b750fb42bd7b43caa4eb74ac6229b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e34debd86c48fb43204f6fe91a9e37dec67529ec2df1fff938de718a29e344a1f06cb0940375b84db3876faaa9423684db1f57b595d549727c65d8844388d0fd
|
7
|
+
data.tar.gz: 5de7ab0c31d241a442ee12b8677157c95ea6e9942067e02255ef2c5ad08c7970eb74e030228d7b18cd1fc09ffac1f9f2a272a366f4c017b7ca65a5bbacc28ee6
|
data/README.md
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
[](https://app.circleci.com/pipelines/github/EdgePetrol/danger-rcov)
|
2
|
-

|
3
|
-
|
4
1
|
# danger-rcov
|
5
2
|
|
6
3
|
This plugin will provide an interface similar to codecov.
|
@@ -32,3 +29,12 @@ This plugin will provide an interface similar to codecov.
|
|
32
29
|
# warning (default: true)
|
33
30
|
markdown rcov.report_by_urls('http://current_branch/coverage.json', 'http://master_branch/coverage.json', true)
|
34
31
|
```
|
32
|
+
|
33
|
+
```
|
34
|
+
# current branch json report file
|
35
|
+
# pr number
|
36
|
+
# stable branch json report file
|
37
|
+
# stable pr number
|
38
|
+
# warning (default: true)
|
39
|
+
markdown rcov.report_by_files(current_cov_json_file, current_pr_number, prev_cov_json_file, previous_pr_number, true)
|
40
|
+
```
|
data/danger-rcov.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'rcov/gem_version
|
5
|
+
require 'rcov/gem_version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'danger-rcov'
|
9
9
|
spec.version = Rcov::VERSION
|
10
10
|
spec.authors = ['Guilherme Pereira']
|
11
|
-
spec.email = ['
|
11
|
+
spec.email = ['guiferrpereira@gmail.com']
|
12
12
|
spec.description = %(Plugin that allows code coverage print)
|
13
13
|
spec.summary = %(Plugin that allows code coverage print)
|
14
|
-
spec.homepage = 'https://github.com/
|
14
|
+
spec.homepage = 'https://github.com/guiferrpereira/danger-rcov'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
spec.required_ruby_version = '>= 2.4.0'
|
17
17
|
|
data/lib/rcov/gem_version.rb
CHANGED
data/lib/rcov/plugin.rb
CHANGED
@@ -5,58 +5,43 @@ require 'net/http'
|
|
5
5
|
require 'circle_ci_wrapper'
|
6
6
|
|
7
7
|
module Danger
|
8
|
-
class
|
9
|
-
|
10
|
-
def report(branch_name = 'master', build_name = 'build', show_warning = true)
|
11
|
-
current_url, master_url = CircleCiWrapper.report_urls_by_branch(branch_name, build_name)
|
8
|
+
class Coverage
|
9
|
+
attr_reader :pr_number, :covered_percent, :files_count, :total_lines, :missed_lines
|
12
10
|
|
13
|
-
|
14
|
-
|
11
|
+
def initialize(pr_number, coverage_report)
|
12
|
+
coverage = JSON.parse(coverage_report)
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
@
|
19
|
-
@
|
20
|
-
|
21
|
-
if show_warning && @master_report && @master_report.dig('metrics', 'covered_percent').round(2) > @current_report.dig('metrics', 'covered_percent').round(2)
|
22
|
-
warn("Code coverage decreased from #{@master_report.dig('metrics', 'covered_percent').round(2)}% to #{@current_report.dig('metrics', 'covered_percent').round(2)}%")
|
23
|
-
end
|
24
|
-
|
25
|
-
# Output the processed report
|
26
|
-
output_report(@current_report, @master_report)
|
14
|
+
@pr_number = pr_number
|
15
|
+
@covered_percent = coverage&.dig('metrics', 'covered_percent')&.round(2)
|
16
|
+
@files_count = coverage&.dig('files')&.count
|
17
|
+
@total_lines = coverage&.dig('metrics', 'total_lines')
|
18
|
+
@missed_lines = @total_lines - coverage&.dig('metrics', 'covered_lines')
|
27
19
|
end
|
20
|
+
end
|
28
21
|
|
29
|
-
|
22
|
+
class CoverageReport
|
23
|
+
attr_reader :current, :previous
|
30
24
|
|
31
|
-
def
|
32
|
-
|
25
|
+
def initialize(current, previous)
|
26
|
+
@current = current
|
27
|
+
@previous = previous
|
33
28
|
end
|
34
29
|
|
35
|
-
def
|
36
|
-
@current_covered_percent = results&.dig('metrics', 'covered_percent')&.round(2)
|
37
|
-
@current_files_count = results&.dig('files')&.count
|
38
|
-
@current_total_lines = results&.dig('metrics', 'total_lines')
|
39
|
-
@current_misses_count = @current_total_lines - results&.dig('metrics', 'covered_lines')
|
40
|
-
|
41
|
-
if master_results
|
42
|
-
@master_covered_percent = master_results&.dig('metrics', 'covered_percent')&.round(2)
|
43
|
-
@master_files_count = master_results.dig('files')&.count
|
44
|
-
@master_total_lines = master_results.dig('metrics', 'total_lines')
|
45
|
-
@master_misses_count = @master_total_lines - master_results.dig('metrics', 'covered_lines')
|
46
|
-
end
|
47
|
-
|
30
|
+
def print
|
48
31
|
message = "```diff\n@@ Coverage Diff @@\n"
|
49
|
-
message << "## #{justify_text(
|
32
|
+
message << "## #{justify_text(previous.pr_number, 16)} #{justify_text('#' + current.pr_number, 8)} #{justify_text('+/-', 7)} #{justify_text('##', 3)}\n"
|
50
33
|
message << separator_line
|
51
|
-
message << new_line('Coverage',
|
34
|
+
message << new_line('Coverage', current.covered_percent, previous.covered_percent, '%')
|
52
35
|
message << separator_line
|
53
|
-
message << new_line('Files',
|
54
|
-
message << new_line('Lines',
|
36
|
+
message << new_line('Files', current.files_count, previous.files_count)
|
37
|
+
message << new_line('Lines', current.total_lines, previous.total_lines)
|
55
38
|
message << separator_line
|
56
|
-
message << new_line('Misses',
|
39
|
+
message << new_line('Misses', current.missed_lines, previous.missed_lines)
|
57
40
|
message << '```'
|
58
41
|
end
|
59
42
|
|
43
|
+
private
|
44
|
+
|
60
45
|
def separator_line
|
61
46
|
"========================================\n"
|
62
47
|
end
|
@@ -87,4 +72,42 @@ module Danger
|
|
87
72
|
diff.positive? ? '+ ' : '- '
|
88
73
|
end
|
89
74
|
end
|
75
|
+
|
76
|
+
class DangerRcov < Plugin
|
77
|
+
# report will get the urls from circleCi trough circle_ci_wrapper gem
|
78
|
+
def report(branch_name = 'master', build_name = 'build', show_warning = true)
|
79
|
+
current_url, master_url = CircleCiWrapper.report_urls_by_branch(branch_name, build_name)
|
80
|
+
|
81
|
+
report_by_urls(current_url, master_url, show_warning)
|
82
|
+
end
|
83
|
+
|
84
|
+
def report_by_urls(current_url, master_url, show_warning = true)
|
85
|
+
current_report = get_report(url: current_url)
|
86
|
+
master_report = get_report(url: master_url)
|
87
|
+
|
88
|
+
report_by_files(current_report, ci_pr_number, master_report, 'master', show_warning)
|
89
|
+
end
|
90
|
+
|
91
|
+
def report_by_files(current_file, c_number, previous_file, pr_number, show_warning = true)
|
92
|
+
@current_report = Danger::Coverage.new(c_number, current_file)
|
93
|
+
@master_report = Danger::Coverage.new(pr_number, previous_file)
|
94
|
+
|
95
|
+
if show_warning && @master_report && @master_report.covered_percent > @current_report.covered_percent
|
96
|
+
warn("Code coverage decreased from #{@master_report.covered_percent}% to #{@current_report.covered_percent}%")
|
97
|
+
end
|
98
|
+
|
99
|
+
# Output the processed report
|
100
|
+
Danger::CoverageReport.new(@current_report, @master_report).print
|
101
|
+
end
|
102
|
+
|
103
|
+
private
|
104
|
+
|
105
|
+
def get_report(url:)
|
106
|
+
URI.parse(url).read if url
|
107
|
+
end
|
108
|
+
|
109
|
+
def ci_pr_number
|
110
|
+
ENV['CIRCLE_PULL_REQUEST'].split('/').last if ENV['CIRCLE_PULL_REQUEST']
|
111
|
+
end
|
112
|
+
end
|
90
113
|
end
|
@@ -7,18 +7,18 @@
|
|
7
7
|
"oss" : false,
|
8
8
|
"all_commit_details_truncated" : false,
|
9
9
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
10
|
-
"body" : "[
|
10
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
11
11
|
"usage_queued_at" : "2020-08-12T12:24:07.481Z",
|
12
|
-
"context_ids" : [ "
|
12
|
+
"context_ids" : [ "guiferrpereira-EKS-AWS-Staging" ],
|
13
13
|
"fail_reason" : null,
|
14
14
|
"retry_of" : null,
|
15
15
|
"reponame" : "events-service",
|
16
16
|
"ssh_users" : [ ],
|
17
|
-
"build_url" : "https://circleci.com/gh/
|
17
|
+
"build_url" : "https://circleci.com/gh/guiferrpereira/events-service/88",
|
18
18
|
"parallel" : 1,
|
19
19
|
"failed" : false,
|
20
20
|
"branch" : "staging",
|
21
|
-
"username" : "
|
21
|
+
"username" : "guiferrpereira",
|
22
22
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
23
23
|
"why" : "github",
|
24
24
|
"user" : {
|
@@ -55,7 +55,7 @@
|
|
55
55
|
"status" : "success",
|
56
56
|
"committer_name" : "GitHub",
|
57
57
|
"retries" : null,
|
58
|
-
"subject" : "Merge pull request #3 from
|
58
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
59
59
|
"vcs_type" : "github",
|
60
60
|
"timedout" : false,
|
61
61
|
"dont_build" : null,
|
@@ -80,29 +80,29 @@
|
|
80
80
|
"commit" : "19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
81
81
|
"committer_login" : "guiferrpereira",
|
82
82
|
"committer_name" : "Guilherme Pereira",
|
83
|
-
"subject" : "[
|
84
|
-
"commit_url" : "https://github.com/
|
83
|
+
"subject" : "[ISSUE-2878] Add helm setup",
|
84
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
85
85
|
"author_login" : "guiferrpereira",
|
86
86
|
"author_name" : "Guilherme Pereira",
|
87
87
|
"author_email" : "guiferrpereira@gmail.com"
|
88
88
|
}, {
|
89
89
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
90
|
-
"body" : "[
|
90
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
91
91
|
"branch" : "staging",
|
92
92
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
93
93
|
"committer_email" : "noreply@github.com",
|
94
94
|
"commit" : "a19872d95a7edf499fe4d35b17050041851498ef",
|
95
95
|
"committer_login" : "web-flow",
|
96
96
|
"committer_name" : "GitHub",
|
97
|
-
"subject" : "Merge pull request #3 from
|
98
|
-
"commit_url" : "https://github.com/
|
97
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
98
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/a19872d95a7edf499fe4d35b17050041851498ef",
|
99
99
|
"author_login" : "guiferrpereira",
|
100
100
|
"author_name" : "Guilherme Pereira",
|
101
101
|
"author_email" : "guiferrpereira@gmail.com"
|
102
102
|
} ],
|
103
103
|
"platform" : "1.0",
|
104
104
|
"outcome" : "success",
|
105
|
-
"vcs_url" : "https://github.com/
|
105
|
+
"vcs_url" : "https://github.com/guiferrpereira/events-service",
|
106
106
|
"author_name" : "Guilherme Pereira",
|
107
107
|
"node" : null,
|
108
108
|
"queued_at" : "2020-08-12T12:24:07.509Z",
|
@@ -117,18 +117,18 @@
|
|
117
117
|
"oss" : false,
|
118
118
|
"all_commit_details_truncated" : false,
|
119
119
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
120
|
-
"body" : "[
|
120
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
121
121
|
"usage_queued_at" : "2020-08-12T12:21:09.493Z",
|
122
|
-
"context_ids" : [ "
|
122
|
+
"context_ids" : [ "guiferrpereira-EKS-AWS-Staging" ],
|
123
123
|
"fail_reason" : null,
|
124
124
|
"retry_of" : null,
|
125
125
|
"reponame" : "events-service",
|
126
126
|
"ssh_users" : [ ],
|
127
|
-
"build_url" : "https://circleci.com/gh/
|
127
|
+
"build_url" : "https://circleci.com/gh/guiferrpereira/events-service/87",
|
128
128
|
"parallel" : 1,
|
129
129
|
"failed" : false,
|
130
130
|
"branch" : "staging",
|
131
|
-
"username" : "
|
131
|
+
"username" : "guiferrpereira",
|
132
132
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
133
133
|
"why" : "github",
|
134
134
|
"user" : {
|
@@ -165,7 +165,7 @@
|
|
165
165
|
"status" : "success",
|
166
166
|
"committer_name" : "GitHub",
|
167
167
|
"retries" : null,
|
168
|
-
"subject" : "Merge pull request #3 from
|
168
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
169
169
|
"vcs_type" : "github",
|
170
170
|
"timedout" : false,
|
171
171
|
"dont_build" : null,
|
@@ -190,29 +190,29 @@
|
|
190
190
|
"commit" : "19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
191
191
|
"committer_login" : "guiferrpereira",
|
192
192
|
"committer_name" : "Guilherme Pereira",
|
193
|
-
"subject" : "[
|
194
|
-
"commit_url" : "https://github.com/
|
193
|
+
"subject" : "[ISSUE-2878] Add helm setup",
|
194
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
195
195
|
"author_login" : "guiferrpereira",
|
196
196
|
"author_name" : "Guilherme Pereira",
|
197
197
|
"author_email" : "guiferrpereira@gmail.com"
|
198
198
|
}, {
|
199
199
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
200
|
-
"body" : "[
|
200
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
201
201
|
"branch" : "staging",
|
202
202
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
203
203
|
"committer_email" : "noreply@github.com",
|
204
204
|
"commit" : "a19872d95a7edf499fe4d35b17050041851498ef",
|
205
205
|
"committer_login" : "web-flow",
|
206
206
|
"committer_name" : "GitHub",
|
207
|
-
"subject" : "Merge pull request #3 from
|
208
|
-
"commit_url" : "https://github.com/
|
207
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
208
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/a19872d95a7edf499fe4d35b17050041851498ef",
|
209
209
|
"author_login" : "guiferrpereira",
|
210
210
|
"author_name" : "Guilherme Pereira",
|
211
211
|
"author_email" : "guiferrpereira@gmail.com"
|
212
212
|
} ],
|
213
213
|
"platform" : "1.0",
|
214
214
|
"outcome" : "success",
|
215
|
-
"vcs_url" : "https://github.com/
|
215
|
+
"vcs_url" : "https://github.com/guiferrpereira/events-service",
|
216
216
|
"author_name" : "Guilherme Pereira",
|
217
217
|
"node" : null,
|
218
218
|
"queued_at" : "2020-08-12T12:21:09.534Z",
|
@@ -227,18 +227,18 @@
|
|
227
227
|
"oss" : false,
|
228
228
|
"all_commit_details_truncated" : false,
|
229
229
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
230
|
-
"body" : "[
|
230
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
231
231
|
"usage_queued_at" : "2020-08-12T12:18:59.949Z",
|
232
232
|
"context_ids" : [ ],
|
233
233
|
"fail_reason" : null,
|
234
234
|
"retry_of" : null,
|
235
235
|
"reponame" : "events-service",
|
236
236
|
"ssh_users" : [ ],
|
237
|
-
"build_url" : "https://circleci.com/gh/
|
237
|
+
"build_url" : "https://circleci.com/gh/guiferrpereira/events-service/86",
|
238
238
|
"parallel" : 1,
|
239
239
|
"failed" : false,
|
240
240
|
"branch" : "staging",
|
241
|
-
"username" : "
|
241
|
+
"username" : "guiferrpereira",
|
242
242
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
243
243
|
"why" : "github",
|
244
244
|
"user" : {
|
@@ -272,7 +272,7 @@
|
|
272
272
|
"status" : "success",
|
273
273
|
"committer_name" : "GitHub",
|
274
274
|
"retries" : null,
|
275
|
-
"subject" : "Merge pull request #3 from
|
275
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
276
276
|
"vcs_type" : "github",
|
277
277
|
"timedout" : false,
|
278
278
|
"dont_build" : null,
|
@@ -297,29 +297,29 @@
|
|
297
297
|
"commit" : "19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
298
298
|
"committer_login" : "guiferrpereira",
|
299
299
|
"committer_name" : "Guilherme Pereira",
|
300
|
-
"subject" : "[
|
301
|
-
"commit_url" : "https://github.com/
|
300
|
+
"subject" : "[ISSUE-2878] Add helm setup",
|
301
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
302
302
|
"author_login" : "guiferrpereira",
|
303
303
|
"author_name" : "Guilherme Pereira",
|
304
304
|
"author_email" : "guiferrpereira@gmail.com"
|
305
305
|
}, {
|
306
306
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
307
|
-
"body" : "[
|
307
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
308
308
|
"branch" : "staging",
|
309
309
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
310
310
|
"committer_email" : "noreply@github.com",
|
311
311
|
"commit" : "a19872d95a7edf499fe4d35b17050041851498ef",
|
312
312
|
"committer_login" : "web-flow",
|
313
313
|
"committer_name" : "GitHub",
|
314
|
-
"subject" : "Merge pull request #3 from
|
315
|
-
"commit_url" : "https://github.com/
|
314
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
315
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/a19872d95a7edf499fe4d35b17050041851498ef",
|
316
316
|
"author_login" : "guiferrpereira",
|
317
317
|
"author_name" : "Guilherme Pereira",
|
318
318
|
"author_email" : "guiferrpereira@gmail.com"
|
319
319
|
} ],
|
320
320
|
"platform" : "1.0",
|
321
321
|
"outcome" : "success",
|
322
|
-
"vcs_url" : "https://github.com/
|
322
|
+
"vcs_url" : "https://github.com/guiferrpereira/events-service",
|
323
323
|
"author_name" : "Guilherme Pereira",
|
324
324
|
"node" : null,
|
325
325
|
"queued_at" : "2020-08-12T12:18:59.978Z",
|
@@ -334,18 +334,18 @@
|
|
334
334
|
"oss" : false,
|
335
335
|
"all_commit_details_truncated" : false,
|
336
336
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
337
|
-
"body" : "[
|
337
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
338
338
|
"usage_queued_at" : "2020-08-12T12:18:59.808Z",
|
339
|
-
"context_ids" : [ "
|
339
|
+
"context_ids" : [ "RcovApp" ],
|
340
340
|
"fail_reason" : null,
|
341
341
|
"retry_of" : null,
|
342
342
|
"reponame" : "events-service",
|
343
343
|
"ssh_users" : [ ],
|
344
|
-
"build_url" : "https://circleci.com/gh/
|
344
|
+
"build_url" : "https://circleci.com/gh/guiferrpereira/events-service/85",
|
345
345
|
"parallel" : 1,
|
346
346
|
"failed" : false,
|
347
347
|
"branch" : "staging",
|
348
|
-
"username" : "
|
348
|
+
"username" : "guiferrpereira",
|
349
349
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
350
350
|
"why" : "github",
|
351
351
|
"user" : {
|
@@ -379,7 +379,7 @@
|
|
379
379
|
"status" : "success",
|
380
380
|
"committer_name" : "GitHub",
|
381
381
|
"retries" : null,
|
382
|
-
"subject" : "Merge pull request #3 from
|
382
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
383
383
|
"vcs_type" : "github",
|
384
384
|
"timedout" : false,
|
385
385
|
"dont_build" : null,
|
@@ -404,29 +404,29 @@
|
|
404
404
|
"commit" : "19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
405
405
|
"committer_login" : "guiferrpereira",
|
406
406
|
"committer_name" : "Guilherme Pereira",
|
407
|
-
"subject" : "[
|
408
|
-
"commit_url" : "https://github.com/
|
407
|
+
"subject" : "[ISSUE-2878] Add helm setup",
|
408
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
409
409
|
"author_login" : "guiferrpereira",
|
410
410
|
"author_name" : "Guilherme Pereira",
|
411
411
|
"author_email" : "guiferrpereira@gmail.com"
|
412
412
|
}, {
|
413
413
|
"committer_date" : "2020-08-12T12:18:56.000Z",
|
414
|
-
"body" : "[
|
414
|
+
"body" : "[ISSUE-2878] Add helm setup",
|
415
415
|
"branch" : "staging",
|
416
416
|
"author_date" : "2020-08-12T12:18:56.000Z",
|
417
417
|
"committer_email" : "noreply@github.com",
|
418
418
|
"commit" : "a19872d95a7edf499fe4d35b17050041851498ef",
|
419
419
|
"committer_login" : "web-flow",
|
420
420
|
"committer_name" : "GitHub",
|
421
|
-
"subject" : "Merge pull request #3 from
|
422
|
-
"commit_url" : "https://github.com/
|
421
|
+
"subject" : "Merge pull request #3 from guiferrpereira/feature/ISSUE-2878",
|
422
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/a19872d95a7edf499fe4d35b17050041851498ef",
|
423
423
|
"author_login" : "guiferrpereira",
|
424
424
|
"author_name" : "Guilherme Pereira",
|
425
425
|
"author_email" : "guiferrpereira@gmail.com"
|
426
426
|
} ],
|
427
427
|
"platform" : "1.0",
|
428
428
|
"outcome" : "success",
|
429
|
-
"vcs_url" : "https://github.com/
|
429
|
+
"vcs_url" : "https://github.com/guiferrpereira/events-service",
|
430
430
|
"author_name" : "Guilherme Pereira",
|
431
431
|
"node" : null,
|
432
432
|
"queued_at" : "2020-08-12T12:18:59.837Z",
|
@@ -443,16 +443,16 @@
|
|
443
443
|
"committer_date" : null,
|
444
444
|
"body" : null,
|
445
445
|
"usage_queued_at" : "2020-08-12T12:09:10.936Z",
|
446
|
-
"context_ids" : [ "
|
446
|
+
"context_ids" : [ "RcovApp" ],
|
447
447
|
"fail_reason" : null,
|
448
448
|
"retry_of" : null,
|
449
449
|
"reponame" : "events-service",
|
450
450
|
"ssh_users" : [ ],
|
451
|
-
"build_url" : "https://circleci.com/gh/
|
451
|
+
"build_url" : "https://circleci.com/gh/guiferrpereira/events-service/84",
|
452
452
|
"parallel" : 1,
|
453
453
|
"failed" : false,
|
454
454
|
"branch" : "staging",
|
455
|
-
"username" : "
|
455
|
+
"username" : "guiferrpereira",
|
456
456
|
"author_date" : null,
|
457
457
|
"why" : "github",
|
458
458
|
"user" : {
|
@@ -505,7 +505,7 @@
|
|
505
505
|
"all_commit_details" : [ ],
|
506
506
|
"platform" : "1.0",
|
507
507
|
"outcome" : "success",
|
508
|
-
"vcs_url" : "https://github.com/
|
508
|
+
"vcs_url" : "https://github.com/guiferrpereira/events-service",
|
509
509
|
"author_name" : null,
|
510
510
|
"node" : null,
|
511
511
|
"queued_at" : "2020-08-12T12:09:10.980Z",
|
@@ -522,16 +522,16 @@
|
|
522
522
|
"committer_date" : "2020-08-12T11:55:39.000Z",
|
523
523
|
"body" : "",
|
524
524
|
"usage_queued_at" : "2020-08-12T12:05:01.272Z",
|
525
|
-
"context_ids" : [ "
|
525
|
+
"context_ids" : [ "guiferrpereira-EKS-AWS-Staging" ],
|
526
526
|
"fail_reason" : null,
|
527
527
|
"retry_of" : null,
|
528
528
|
"reponame" : "events-service",
|
529
529
|
"ssh_users" : [ ],
|
530
|
-
"build_url" : "https://circleci.com/gh/
|
530
|
+
"build_url" : "https://circleci.com/gh/guiferrpereira/events-service/83",
|
531
531
|
"parallel" : 1,
|
532
532
|
"failed" : false,
|
533
533
|
"branch" : "staging",
|
534
|
-
"username" : "
|
534
|
+
"username" : "guiferrpereira",
|
535
535
|
"author_date" : "2020-08-12T11:55:39.000Z",
|
536
536
|
"why" : "github",
|
537
537
|
"user" : {
|
@@ -568,7 +568,7 @@
|
|
568
568
|
"status" : "success",
|
569
569
|
"committer_name" : "Guilherme Pereira",
|
570
570
|
"retries" : null,
|
571
|
-
"subject" : "[
|
571
|
+
"subject" : "[ISSUE-2878] Add helm setup",
|
572
572
|
"vcs_type" : "github",
|
573
573
|
"timedout" : false,
|
574
574
|
"dont_build" : null,
|
@@ -593,22 +593,22 @@
|
|
593
593
|
"commit" : "49572ac813baa84ea3684d9e5533b9b80dec8d94",
|
594
594
|
"committer_login" : "guiferrpereira",
|
595
595
|
"committer_name" : "Guilherme Pereira",
|
596
|
-
"subject" : "[
|
597
|
-
"commit_url" : "https://github.com/
|
596
|
+
"subject" : "[ISSUE-2760] Add sidekiq deployment file",
|
597
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/49572ac813baa84ea3684d9e5533b9b80dec8d94",
|
598
598
|
"author_login" : "guiferrpereira",
|
599
599
|
"author_name" : "Guilherme Pereira",
|
600
600
|
"author_email" : "guiferrpereira@gmail.com"
|
601
601
|
}, {
|
602
602
|
"committer_date" : "2020-08-11T08:39:05.000Z",
|
603
|
-
"body" : "[
|
603
|
+
"body" : "[ISSUE-2760] Add sidekiq deployment file",
|
604
604
|
"branch" : "staging",
|
605
605
|
"author_date" : "2020-08-11T08:39:05.000Z",
|
606
606
|
"committer_email" : "noreply@github.com",
|
607
607
|
"commit" : "89af2d840914dcfd3e2409df80fb788a1d65e95a",
|
608
608
|
"committer_login" : "web-flow",
|
609
609
|
"committer_name" : "GitHub",
|
610
|
-
"subject" : "Merge pull request #1 from
|
611
|
-
"commit_url" : "https://github.com/
|
610
|
+
"subject" : "Merge pull request #1 from guiferrpereira/feature/ISSUE-2760",
|
611
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/89af2d840914dcfd3e2409df80fb788a1d65e95a",
|
612
612
|
"author_login" : "guiferrpereira",
|
613
613
|
"author_name" : "Guilherme Pereira",
|
614
614
|
"author_email" : "guiferrpereira@gmail.com"
|
@@ -621,22 +621,22 @@
|
|
621
621
|
"commit" : "916c8368183bd79eb61e3e62d0bbd3b8d126f3b6",
|
622
622
|
"committer_login" : "guiferrpereira",
|
623
623
|
"committer_name" : "Guilherme Pereira",
|
624
|
-
"subject" : "[
|
625
|
-
"commit_url" : "https://github.com/
|
624
|
+
"subject" : "[ISSUE-2872] Fixup sidekiq setup",
|
625
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/916c8368183bd79eb61e3e62d0bbd3b8d126f3b6",
|
626
626
|
"author_login" : "guiferrpereira",
|
627
627
|
"author_name" : "Guilherme Pereira",
|
628
628
|
"author_email" : "guiferrpereira@gmail.com"
|
629
629
|
}, {
|
630
630
|
"committer_date" : "2020-08-11T10:41:59.000Z",
|
631
|
-
"body" : "[
|
631
|
+
"body" : "[ISSUE-2872] Fixup sidekiq setup",
|
632
632
|
"branch" : "staging",
|
633
633
|
"author_date" : "2020-08-11T10:41:59.000Z",
|
634
634
|
"committer_email" : "noreply@github.com",
|
635
635
|
"commit" : "51b36b1caba542dce438e87686ecef28db4b10bb",
|
636
636
|
"committer_login" : "web-flow",
|
637
637
|
"committer_name" : "GitHub",
|
638
|
-
"subject" : "Merge pull request #2 from
|
639
|
-
"commit_url" : "https://github.com/
|
638
|
+
"subject" : "Merge pull request #2 from guiferrpereira/feature/ISSUE-2872",
|
639
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/51b36b1caba542dce438e87686ecef28db4b10bb",
|
640
640
|
"author_login" : "guiferrpereira",
|
641
641
|
"author_name" : "Guilherme Pereira",
|
642
642
|
"author_email" : "guiferrpereira@gmail.com"
|
@@ -649,15 +649,15 @@
|
|
649
649
|
"commit" : "19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
650
650
|
"committer_login" : "guiferrpereira",
|
651
651
|
"committer_name" : "Guilherme Pereira",
|
652
|
-
"subject" : "[
|
653
|
-
"commit_url" : "https://github.com/
|
652
|
+
"subject" : "[ISSUE-2878] Add helm setup",
|
653
|
+
"commit_url" : "https://github.com/guiferrpereira/events-service/commit/19e1b4db40c2184bfca1885fe8d14db78cf8f288",
|
654
654
|
"author_login" : "guiferrpereira",
|
655
655
|
"author_name" : "Guilherme Pereira",
|
656
656
|
"author_email" : "guiferrpereira@gmail.com"
|
657
657
|
} ],
|
658
658
|
"platform" : "1.0",
|
659
659
|
"outcome" : "success",
|
660
|
-
"vcs_url" : "https://github.com/
|
660
|
+
"vcs_url" : "https://github.com/guiferrpereira/events-service",
|
661
661
|
"author_name" : "Guilherme Pereira",
|
662
662
|
"node" : null,
|
663
663
|
"queued_at" : "2020-08-12T12:05:01.304Z",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-rcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Pereira
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: circle_ci_wrapper
|
@@ -208,12 +208,11 @@ dependencies:
|
|
208
208
|
version: '0'
|
209
209
|
description: Plugin that allows code coverage print
|
210
210
|
email:
|
211
|
-
-
|
211
|
+
- guiferrpereira@gmail.com
|
212
212
|
executables: []
|
213
213
|
extensions: []
|
214
214
|
extra_rdoc_files: []
|
215
215
|
files:
|
216
|
-
- ".circleci/config.yml"
|
217
216
|
- ".gem_release.yml"
|
218
217
|
- ".gitignore"
|
219
218
|
- ".rubocop.yml"
|
@@ -236,11 +235,11 @@ files:
|
|
236
235
|
- spec/support/fixtures/master_circle_ci.json
|
237
236
|
- spec/support/fixtures/master_coverage.json
|
238
237
|
- spec/support/fixtures/tree_ci.json
|
239
|
-
homepage: https://github.com/
|
238
|
+
homepage: https://github.com/guiferrpereira/danger-rcov
|
240
239
|
licenses:
|
241
240
|
- MIT
|
242
241
|
metadata: {}
|
243
|
-
post_install_message:
|
242
|
+
post_install_message:
|
244
243
|
rdoc_options: []
|
245
244
|
require_paths:
|
246
245
|
- lib
|
@@ -255,8 +254,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
254
|
- !ruby/object:Gem::Version
|
256
255
|
version: '0'
|
257
256
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
259
|
-
signing_key:
|
257
|
+
rubygems_version: 3.2.22
|
258
|
+
signing_key:
|
260
259
|
specification_version: 4
|
261
260
|
summary: Plugin that allows code coverage print
|
262
261
|
test_files:
|
data/.circleci/config.yml
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
workflows:
|
3
|
-
test-workflow:
|
4
|
-
jobs:
|
5
|
-
- build:
|
6
|
-
context: EdgePetrolApp
|
7
|
-
jobs:
|
8
|
-
build:
|
9
|
-
docker:
|
10
|
-
- image: circleci/ruby:2.7.1
|
11
|
-
environment:
|
12
|
-
RUBYOPT: '-W0 -KU -E utf-8:utf-8'
|
13
|
-
|
14
|
-
steps:
|
15
|
-
- checkout
|
16
|
-
- run:
|
17
|
-
name: Install Cmake
|
18
|
-
command: sudo apt-get install cmake
|
19
|
-
- restore_cache:
|
20
|
-
keys:
|
21
|
-
- edge-bundle-{{ checksum "Gemfile.lock" }}
|
22
|
-
- edge-bundle-
|
23
|
-
- run:
|
24
|
-
name: Bundle Check or Install
|
25
|
-
command: bundle check --path vendor/bundle || bundle install --jobs=4 --retry=3 --path vendor/bundle
|
26
|
-
- save_cache:
|
27
|
-
key: edge-bundle-{{ checksum "Gemfile.lock" }}
|
28
|
-
paths:
|
29
|
-
- vendor/bundle
|
30
|
-
- run:
|
31
|
-
name: Lint code
|
32
|
-
command: bundle exec rubocop
|
33
|
-
- run:
|
34
|
-
name: Execute Rspec Tests
|
35
|
-
command: |
|
36
|
-
mkdir -p /tmp/coverage
|
37
|
-
bundle exec rspec
|
38
|
-
- run:
|
39
|
-
name: Store coverage report
|
40
|
-
command: |
|
41
|
-
mv coverage/coverage.json /tmp/coverage/
|
42
|
-
mv coverage/badge.svg /tmp/coverage/
|
43
|
-
- persist_to_workspace:
|
44
|
-
root: /tmp/coverage
|
45
|
-
paths: .
|
46
|
-
- store_artifacts:
|
47
|
-
path: /tmp/coverage
|
48
|
-
destination: coverage
|
49
|
-
- run:
|
50
|
-
name: Run Danger
|
51
|
-
command: bundle exec danger
|
52
|
-
- run:
|
53
|
-
name: Upload coverage to be persistent
|
54
|
-
command: |
|
55
|
-
mkdir -p /tmp/internal
|
56
|
-
cd /tmp/internal
|
57
|
-
git config --global user.email "bot@edgepetrol.com"
|
58
|
-
git config --global user.name "EdgeBot"
|
59
|
-
git clone https://EdgePetrolBot:${DANGER_GITHUB_API_TOKEN}@github.com/EdgePetrol/coverage.git
|
60
|
-
cd coverage
|
61
|
-
mkdir -p ${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}
|
62
|
-
mv /tmp/coverage/* /tmp/internal/coverage/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}
|
63
|
-
git add . && git commit -m "Add ${CIRCLE_PROJECT_REPONAME} coverage"
|
64
|
-
git push --set-upstream origin master
|
65
|
-
- run:
|
66
|
-
name: Run gem build and push
|
67
|
-
command: |-
|
68
|
-
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
69
|
-
git config --global user.email "bot@edgepetrol.com"
|
70
|
-
git config --global user.name "EdgeBot"
|
71
|
-
gem install gem-release --no-document
|
72
|
-
gem bump --skip-ci
|
73
|
-
git remote set-url --push origin https://EdgePetrolBot:${EDGE_GITHUB_API_TOKEN}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git
|
74
|
-
git push --set-upstream origin ${CIRCLE_BRANCH}
|
75
|
-
GEM_VERSION=$(gem build | awk '/File/ {print $2}')
|
76
|
-
curl -X POST https://rubygems.org/api/v1/gems -H "Authorization:${RUBY_GEMS_API_TOKEN}" -H "Content-Type: application/gem" --data-binary "@${GEM_VERSION}"
|
77
|
-
fi
|