ci-queue 0.51.0 → 0.53.0

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: 54b9a3eb96743e79e564f0a0c90ff4923c4c2282e1f7926e40c575a8de7c9e94
4
- data.tar.gz: 27cb858f6f2ca20dc7649ff4d1ab040896c347d0acf7093b0f9bb3fb03abd878
3
+ metadata.gz: e6b0d4731f188b996f4fe00ba834175bbb297c8a73c2cf76d7b1586f9b4b5f27
4
+ data.tar.gz: 39f06f76eefaf43ac5f3bd19220a42e93c3cedf0517da115569862288338bc83
5
5
  SHA512:
6
- metadata.gz: 99c4f39dbf0d287d87b283d994c5c14cd8b7a49d3e426a9c9fbf9b752cb4818a7c89a64a4526318717bba7a0759fce39c843f5c26df894f7f0d427c1b9d2f9be
7
- data.tar.gz: adaaff3e53cedfcb8c2e4446f079a6cbd75fc7c56c1b7db1bf99bf820de06f7eb19bf16d68517ce65cfcfa908d83785ccebf08727ae13533e4f1e8ea746ca013
6
+ metadata.gz: c4fe6eb4407a5d53fc31633e977ba662edcabf7c3d122fb4e92acdea4e668ce9552e1c9a70c4961bd3c4a538d91dc6ae5c2954560545069f7ce7ddca9c756e5a
7
+ data.tar.gz: 6f98c8690553f900aa28144cd876ce04b2c93e280bee986d78c01608161d95bb9835fba054aa9a646339a29bcc5e415879baef9c10da895198dd7330ca6c27ba
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ci-queue (0.51.0)
4
+ ci-queue (0.53.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.51.0'
5
+ VERSION = '0.53.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -75,6 +75,14 @@ module Minitest
75
75
  build.progress
76
76
  end
77
77
 
78
+ def write_failure_file(file)
79
+ File.write(file, error_reports.map(&:to_h).to_json)
80
+ end
81
+
82
+ def write_flaky_tests_file(file)
83
+ File.write(file, flaky_reports.to_json)
84
+ end
85
+
78
86
  private
79
87
 
80
88
  attr_reader :build
@@ -208,7 +208,7 @@ module Minitest
208
208
  puts
209
209
  end
210
210
 
211
- if run_index == 0
211
+ if queue.suspects_left == 0
212
212
  step(yellow("The failing test was the first test in the test order so there is nothing to bisect."))
213
213
  File.write('log/test_order.log', "")
214
214
  exit! 1
@@ -252,7 +252,11 @@ module Minitest
252
252
  unless supervisor.exhausted?
253
253
  reporter = BuildStatusReporter.new(build: supervisor.build)
254
254
  reporter.report
255
+ reporter.write_failure_file(queue_config.failure_file) if queue_config.failure_file
256
+ reporter.write_flaky_tests_file(queue_config.export_flaky_tests_file) if queue_config.export_flaky_tests_file
257
+
255
258
  msg = "#{supervisor.size} tests weren't run."
259
+
256
260
  if supervisor.max_test_failed?
257
261
  puts('Encountered too many failed tests. Test run was ended early.')
258
262
  abort!(msg)
@@ -263,18 +267,10 @@ module Minitest
263
267
  end
264
268
 
265
269
  reporter = BuildStatusReporter.new(build: supervisor.build)
266
-
267
- if queue_config.failure_file
268
- failures = reporter.error_reports.map(&:to_h).to_json
269
- File.write(queue_config.failure_file, failures)
270
- end
271
-
272
- if queue_config.export_flaky_tests_file
273
- failures = reporter.flaky_reports.to_json
274
- File.write(queue_config.export_flaky_tests_file, failures)
275
- end
276
-
270
+ reporter.write_failure_file(queue_config.failure_file) if queue_config.failure_file
271
+ reporter.write_flaky_tests_file(queue_config.export_flaky_tests_file) if queue_config.export_flaky_tests_file
277
272
  reporter.report
273
+
278
274
  exit! reporter.success? ? 0 : 1
279
275
  end
280
276
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.51.0
4
+ version: 0.53.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-29 00:00:00.000000000 Z
11
+ date: 2024-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
242
  - !ruby/object:Gem::Version
243
243
  version: '0'
244
244
  requirements: []
245
- rubygems_version: 3.5.9
245
+ rubygems_version: 3.5.10
246
246
  signing_key:
247
247
  specification_version: 4
248
248
  summary: Distribute tests over many workers using a queue