minitest-retry 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ubuntu.yml +22 -0
- data/.travis.yml +8 -5
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/lib/minitest/retry.rb +2 -2
- data/lib/minitest/retry/version.rb +1 -1
- data/minitest-retry.gemspec +2 -2
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d8f9f6226ef75875a95897d986e79878ce5c09f5406fb3048c0550161281e8aa
|
4
|
+
data.tar.gz: 4b969cc059624894c5dcd5d41c56b708867d999a283e2d8c89396074f5e7bdb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75616b64822f66378bd933caa1c60fcab593a066045354bc8dfe9bf6510630fe3cd5e2fef9676256e181884a85983c877241d5e95b10a49919187381005951a4
|
7
|
+
data.tar.gz: 74ae721f2210599aa00df4cf8ad8815eb3466e7e0abfe447d861434a050dd1d7858b4db0f633d731cfb711863070cefca58824fcba532d64d92e0b7fee0aadaa
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ]
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@master
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
version: ${{ matrix.ruby }}
|
17
|
+
- name: Install dependencies
|
18
|
+
run: |
|
19
|
+
gem install bundler --no-document
|
20
|
+
bundle install
|
21
|
+
- name: Run test
|
22
|
+
run: bundle exec rake
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -44,12 +44,12 @@ Minitest::Retry.use!(
|
|
44
44
|
#### Callbacks
|
45
45
|
The `on_failure` callback is executed each time a test fails:
|
46
46
|
```ruby
|
47
|
-
Minitest::Retry.on_failure do |klass, test_name|
|
47
|
+
Minitest::Retry.on_failure do |klass, test_name, result|
|
48
48
|
# code omitted
|
49
49
|
end
|
50
50
|
```
|
51
51
|
|
52
|
-
The `on_consistent_failure` callback is executed
|
52
|
+
The `on_consistent_failure` callback is executed when a test consistently fails:
|
53
53
|
```ruby
|
54
54
|
Minitest::Retry.on_consistent_failure do |klass, test_name|
|
55
55
|
# code omitted
|
@@ -58,7 +58,7 @@ end
|
|
58
58
|
|
59
59
|
The `on_retry` callback is executed each time a test is retried:
|
60
60
|
```ruby
|
61
|
-
Minitest::Retry.on_retry do |klass, test_name, retry_count|
|
61
|
+
Minitest::Retry.on_retry do |klass, test_name, retry_count, result|
|
62
62
|
# code omitted
|
63
63
|
end
|
64
64
|
```
|
data/lib/minitest/retry.rb
CHANGED
@@ -65,9 +65,9 @@ module Minitest
|
|
65
65
|
result = super(klass, method_name)
|
66
66
|
return result unless Minitest::Retry.failure_to_retry?(result.failures)
|
67
67
|
if !result.skipped?
|
68
|
-
Minitest::Retry.failure_callback.call(klass, method_name) if Minitest::Retry.failure_callback
|
68
|
+
Minitest::Retry.failure_callback.call(klass, method_name, result) if Minitest::Retry.failure_callback
|
69
69
|
Minitest::Retry.retry_count.times do |count|
|
70
|
-
Minitest::Retry.retry_callback.call(klass, method_name, count + 1) if Minitest::Retry.retry_callback
|
70
|
+
Minitest::Retry.retry_callback.call(klass, method_name, count + 1, result) if Minitest::Retry.retry_callback
|
71
71
|
if Minitest::Retry.verbose && Minitest::Retry.io
|
72
72
|
msg = "[MinitestRetry] retry '%s' count: %s, msg: %s\n" %
|
73
73
|
[method_name, count + 1, result.failures.map(&:message).join(",")]
|
data/minitest-retry.gemspec
CHANGED
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_dependency 'minitest', '>= 5.0'
|
26
26
|
|
27
|
-
spec.add_development_dependency "bundler"
|
28
|
-
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "bundler"
|
28
|
+
spec.add_development_dependency "rake"
|
29
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-retry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Yaginuma
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
description: re-run the test when the test fails
|
56
56
|
email:
|
57
57
|
- yuuji.yaginuma@gmail.com
|
@@ -59,6 +59,7 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- ".github/workflows/ubuntu.yml"
|
62
63
|
- ".gitignore"
|
63
64
|
- ".travis.yml"
|
64
65
|
- CHANGELOG.md
|
@@ -91,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: '0'
|
93
94
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.6.12
|
95
|
+
rubygems_version: 3.0.3
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: re-run the test when the test fails
|