turbo_tests 1.3.0 → 1.4.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/.github/workflows/gem-push.yml +54 -0
- data/.github/workflows/snyk_ruby-analysis.yml +1 -1
- data/.github/workflows/tests.yml +11 -6
- data/Gemfile.lock +3 -3
- data/README.md +8 -4
- data/fixtures/rspec/failing_spec.rb +13 -0
- data/lib/turbo_tests/cli.rb +3 -1
- data/lib/turbo_tests/json_rows_formatter.rb +3 -2
- data/lib/turbo_tests/runner.rb +2 -2
- data/lib/turbo_tests/version.rb +1 -1
- data/turbo_tests.gemspec +8 -5
- metadata +13 -11
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ae2d6c3bae097937e69e82c89ade0175ba7edc469947d4b48f3c881462f7663
|
4
|
+
data.tar.gz: 918698e37c573fe5c93144ac47321b90fc7a73f6c92f1c8dd7fbfbb7c8f99c83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6821b254436cad890803683a3d3f0ae9534a5b024bbea909271eeabb7cbd4437f3a92c3f56f5501d6ebf01dbb8f8163c9415bad2ee9877b33ed3a6271eaff9e
|
7
|
+
data.tar.gz: 4f63e106f0e6b785f4f2118cfa1cbeb6ad0c4a08f015791e1a4d8ab4b4816baf58f5899997f27234eff86f0bcfcff52efeaa66493896d9310d4e69d8de6e9784
|
@@ -0,0 +1,54 @@
|
|
1
|
+
name: Publish Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v**
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
permissions:
|
13
|
+
contents: read
|
14
|
+
packages: write
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v3
|
18
|
+
- name: Set up Ruby 2.6
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 2.6
|
22
|
+
bundler-cache: true
|
23
|
+
|
24
|
+
- name: Run tests
|
25
|
+
run: |
|
26
|
+
bundle exec rake install:local
|
27
|
+
bundle install
|
28
|
+
bundle exec turbo_tests
|
29
|
+
|
30
|
+
- uses: actions/upload-artifact@v3
|
31
|
+
with:
|
32
|
+
name: "ruby-gem"
|
33
|
+
path: "pkg/*.gem"
|
34
|
+
|
35
|
+
- name: Publish to GPR
|
36
|
+
run: |
|
37
|
+
mkdir -p $HOME/.gem
|
38
|
+
touch $HOME/.gem/credentials
|
39
|
+
chmod 0600 $HOME/.gem/credentials
|
40
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
41
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} pkg/*.gem
|
42
|
+
env:
|
43
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
44
|
+
OWNER: ${{ github.repository_owner }}
|
45
|
+
|
46
|
+
- name: Publish to RubyGems
|
47
|
+
run: |
|
48
|
+
mkdir -p $HOME/.gem
|
49
|
+
touch $HOME/.gem/credentials
|
50
|
+
chmod 0600 $HOME/.gem/credentials
|
51
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
52
|
+
gem push pkg/*.gem
|
53
|
+
env:
|
54
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
|
@@ -20,7 +20,7 @@ jobs:
|
|
20
20
|
snyk:
|
21
21
|
runs-on: ubuntu-latest
|
22
22
|
steps:
|
23
|
-
- uses: actions/checkout@
|
23
|
+
- uses: actions/checkout@v3
|
24
24
|
- name: Run Snyk to check configuration files for security issues
|
25
25
|
# Snyk can be used to break the build when it detects security issues.
|
26
26
|
# In this case we want to upload the issues to GitHub Code Scanning
|
data/.github/workflows/tests.yml
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
name: Tests
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "master" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "master" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
4
11
|
|
5
12
|
jobs:
|
6
13
|
test:
|
@@ -8,13 +15,11 @@ jobs:
|
|
8
15
|
|
9
16
|
strategy:
|
10
17
|
matrix:
|
11
|
-
ruby:
|
12
|
-
- 2.6
|
13
|
-
- 2.7
|
18
|
+
ruby: [ 2.6, 2.7, 3.0, 3.1, 3.2 ]
|
14
19
|
|
15
20
|
steps:
|
16
|
-
- uses: actions/checkout@
|
17
|
-
- uses: ruby/setup-ruby@
|
21
|
+
- uses: actions/checkout@v3
|
22
|
+
- uses: ruby/setup-ruby@v1
|
18
23
|
with:
|
19
24
|
ruby-version: ${{matrix.ruby}}
|
20
25
|
bundler-cache: true
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
# TurboTests
|
4
4
|
|
5
|
-
|
5
|
+
`turbo_tests` is a drop-in replacement for [`grosser/parallel_tests`](https://github.com/grosser/parallel_tests) with incremental summarized output. Source code of this gem is based on [Discourse](https://github.com/discourse/discourse/blob/6b9784cf8a18636bce281a7e4d18e65a0cbc6290/lib/turbo_tests.rb) and [RubyGems](https://github.com/rubygems/rubygems/tree/390335ceb351668cd433bd5bb9823dd021f82533/bundler/tool) work in this area.
|
6
6
|
|
7
|
-
|
7
|
+
Incremental summarized output [doesn't fit vision of `parallel_tests` author](https://github.com/grosser/parallel_tests/issues/708) and [RSpec doesn't support built-in parallel testing yet](https://github.com/rspec/rspec-rails/issues/2104#issuecomment-658474900). This gem will not be useful once one of the issues above will be implemented.
|
8
8
|
|
9
9
|
## Why incremental output?
|
10
10
|
|
@@ -49,11 +49,15 @@ gem 'turbo_tests'
|
|
49
49
|
|
50
50
|
And then execute:
|
51
51
|
|
52
|
-
|
52
|
+
```bash
|
53
|
+
$ bundle install
|
54
|
+
```
|
53
55
|
|
54
56
|
Or install it yourself as:
|
55
57
|
|
56
|
-
|
58
|
+
```bash
|
59
|
+
$ gem install turbo_tests
|
60
|
+
```
|
57
61
|
|
58
62
|
## Usage
|
59
63
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
RSpec.describe "Failing example group" do
|
2
|
+
after(:each) do |example|
|
3
|
+
example.metadata[:extra_failure_lines] ||= []
|
4
|
+
|
5
|
+
lines = example.metadata[:extra_failure_lines]
|
6
|
+
|
7
|
+
lines << "Test info in extra_failure_lines"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "fails" do
|
11
|
+
expect(2).to eq(3)
|
12
|
+
end
|
13
|
+
end
|
data/lib/turbo_tests/cli.rb
CHANGED
@@ -21,7 +21,9 @@ module TurboTests
|
|
21
21
|
opts.banner = <<~BANNER
|
22
22
|
Run all tests in parallel, giving each process ENV['TEST_ENV_NUMBER'] ('1', '2', '3', ...).
|
23
23
|
|
24
|
-
|
24
|
+
Reports test results incrementally. Uses methods from `parallel_tests` gem to split files to groups.
|
25
|
+
|
26
|
+
Source code of `turbo_tests` gem is based on Discourse and RubyGems work in this area (see README file of the source repository).
|
25
27
|
|
26
28
|
Usage: turbo_tests [options]
|
27
29
|
|
@@ -141,9 +141,10 @@ module TurboTests
|
|
141
141
|
shared_group_inclusion_backtrace:
|
142
142
|
example
|
143
143
|
.metadata[:shared_group_inclusion_backtrace]
|
144
|
-
.map { |frame| stack_frame_to_json(frame) }
|
144
|
+
.map { |frame| stack_frame_to_json(frame) },
|
145
|
+
extra_failure_lines: example.metadata[:extra_failure_lines],
|
145
146
|
},
|
146
|
-
location_rerun_argument: example.location_rerun_argument
|
147
|
+
location_rerun_argument: example.location_rerun_argument,
|
147
148
|
}
|
148
149
|
end
|
149
150
|
|
data/lib/turbo_tests/runner.rb
CHANGED
@@ -50,7 +50,7 @@ module TurboTests
|
|
50
50
|
@load_count = 0
|
51
51
|
@failure_count = 0
|
52
52
|
|
53
|
-
@messages = Queue.new
|
53
|
+
@messages = Thread::Queue.new
|
54
54
|
@threads = []
|
55
55
|
@error = false
|
56
56
|
end
|
@@ -260,7 +260,7 @@ module TurboTests
|
|
260
260
|
end
|
261
261
|
|
262
262
|
def fail_fast_met
|
263
|
-
!@fail_fast.nil? && @
|
263
|
+
!@fail_fast.nil? && @failure_count >= @fail_fast
|
264
264
|
end
|
265
265
|
|
266
266
|
def report_number_of_tests(groups)
|
data/lib/turbo_tests/version.rb
CHANGED
data/turbo_tests.gemspec
CHANGED
@@ -3,25 +3,28 @@ require_relative "lib/turbo_tests/version"
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "turbo_tests"
|
5
5
|
spec.version = TurboTests::VERSION
|
6
|
-
spec.
|
7
|
-
spec.
|
6
|
+
spec.platform = Gem::Platform::RUBY
|
7
|
+
spec.date = Time.now.strftime('%Y-%m-%d')
|
8
8
|
|
9
|
-
spec.summary = "
|
9
|
+
spec.summary = "`turbo_tests` is a drop-in replacement for `grosser/parallel_tests` with incremental summarized output. Source code of `turbo_test` gem is based on Discourse and Rubygems work in this area (see README file of the source repository)."
|
10
10
|
spec.homepage = "https://github.com/serpapi/turbo_tests"
|
11
11
|
spec.license = "MIT"
|
12
12
|
|
13
|
+
spec.authors = ["Illia Zub"]
|
14
|
+
spec.email = ["ilya@serpapi.com"]
|
15
|
+
|
13
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
14
17
|
spec.metadata["source_code_uri"] = "https://github.com/serpapi/turbo_tests"
|
15
18
|
spec.metadata["changelog_uri"] = "https://github.com/serpapi/turbo_tests/releases"
|
16
19
|
|
17
|
-
spec.required_ruby_version = ">= 2.
|
20
|
+
spec.required_ruby_version = ">= 2.6"
|
18
21
|
|
19
22
|
spec.add_dependency "rspec", "~> 3.10"
|
20
23
|
spec.add_dependency "parallel_tests", "~> 3.3"
|
21
24
|
|
22
25
|
spec.add_development_dependency "pry", "~> 0.14"
|
23
26
|
|
24
|
-
spec.add_runtime_dependency "bundler"
|
27
|
+
spec.add_runtime_dependency "bundler", ">= 2.1"
|
25
28
|
|
26
29
|
# Specify which files should be added to the gem when it is released.
|
27
30
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbo_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Illia Zub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -58,27 +58,27 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '2.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '2.1'
|
69
69
|
description:
|
70
70
|
email:
|
71
|
-
-
|
71
|
+
- ilya@serpapi.com
|
72
72
|
executables:
|
73
73
|
- turbo_tests
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".github/workflows/gem-push.yml"
|
77
78
|
- ".github/workflows/snyk_ruby-analysis.yml"
|
78
79
|
- ".github/workflows/tests.yml"
|
79
80
|
- ".gitignore"
|
80
81
|
- ".rspec"
|
81
|
-
- ".travis.yml"
|
82
82
|
- CODE_OF_CONDUCT.md
|
83
83
|
- Gemfile
|
84
84
|
- Gemfile.lock
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- Rakefile
|
88
88
|
- bin/turbo_tests
|
89
89
|
- fixtures/rspec/errors_outside_of_examples_spec.rb
|
90
|
+
- fixtures/rspec/failing_spec.rb
|
90
91
|
- fixtures/rspec/pending_exceptions_spec.rb
|
91
92
|
- lib/turbo_tests.rb
|
92
93
|
- lib/turbo_tests/cli.rb
|
@@ -111,16 +112,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
112
|
requirements:
|
112
113
|
- - ">="
|
113
114
|
- !ruby/object:Gem::Version
|
114
|
-
version: '2.
|
115
|
+
version: '2.6'
|
115
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
117
|
requirements:
|
117
118
|
- - ">="
|
118
119
|
- !ruby/object:Gem::Version
|
119
120
|
version: '0'
|
120
121
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.0.3.1
|
122
123
|
signing_key:
|
123
124
|
specification_version: 4
|
124
|
-
summary:
|
125
|
-
|
125
|
+
summary: "`turbo_tests` is a drop-in replacement for `grosser/parallel_tests` with
|
126
|
+
incremental summarized output. Source code of `turbo_test` gem is based on Discourse
|
127
|
+
and Rubygems work in this area (see README file of the source repository)."
|
126
128
|
test_files: []
|