turbo_tests 1.1.1 → 1.2.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: 617e19bd975077fab07e06ef1a6e5da35e72f962709464f62d32f381c6f4aacf
4
- data.tar.gz: 260869dd5a88d6399f4608942632424027b06696a0d81390c68f2bd8446548af
3
+ metadata.gz: ae7178127f711a2ea749e60ff16ed6e3f46011737c02bf1fd2912b6777869b0a
4
+ data.tar.gz: d07339025c120451ca4e30fd13da954ded64234081759c0b0e9562954447462a
5
5
  SHA512:
6
- metadata.gz: c2eaac23e18d8a3d80e1d074a07f0ce7fafbbb0b6f5dcb0609dd408df0bfd5cd34a58d98fe7befe34a60a060b1f856a1e7e848223104e29dabd5795ea10448e6
7
- data.tar.gz: 977901641b0bbf1b892155dd6197515eba480c0f6fa3d65d2c4e0d7162f1ea7d2935b766a5b0115ac24a23972343ead48c9b0ad31ff92361c028079108ca8509
6
+ metadata.gz: cbb71d599830fa9e86287f389aca4c678794b2258d287dab88bd975f7648bbb4e78b9986c24274b231730d069c88df0d3ce81ce46797723ae44248dec056355f
7
+ data.tar.gz: 12df6012daff0f3925aab5204247174d07a6d41d85b6c3a3a79f6f9a79cdc1a7d3c0b4e874cdf405024913d856683539e31257ab4863883f57af77acbda23154
@@ -0,0 +1,25 @@
1
+ name: Tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ strategy:
10
+ matrix:
11
+ ruby:
12
+ - 2.6
13
+ - 2.7
14
+
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@master
18
+ with:
19
+ ruby-version: ${{matrix.ruby}}
20
+ bundler-cache: true
21
+
22
+ - name: Run tests
23
+ timeout-minutes: 5
24
+ run: |
25
+ ${{matrix.env}} bundle exec turbo_tests -n4
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turbo_tests (1.1.1)
4
+ turbo_tests (1.2.0)
5
+ bundler
5
6
  parallel_tests (~> 3.3)
6
- rspec (~> 3.9)
7
+ rspec (~> 3.10.0)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
@@ -11,26 +12,26 @@ GEM
11
12
  coderay (1.1.3)
12
13
  diff-lcs (1.4.4)
13
14
  method_source (1.0.0)
14
- parallel (1.19.2)
15
- parallel_tests (3.3.0)
15
+ parallel (1.20.1)
16
+ parallel_tests (3.4.0)
16
17
  parallel
17
18
  pry (0.13.1)
18
19
  coderay (~> 1.1)
19
20
  method_source (~> 1.0)
20
21
  rake (12.3.3)
21
- rspec (3.9.0)
22
- rspec-core (~> 3.9.0)
23
- rspec-expectations (~> 3.9.0)
24
- rspec-mocks (~> 3.9.0)
25
- rspec-core (3.9.3)
26
- rspec-support (~> 3.9.3)
27
- rspec-expectations (3.9.4)
22
+ rspec (3.10.0)
23
+ rspec-core (~> 3.10.0)
24
+ rspec-expectations (~> 3.10.0)
25
+ rspec-mocks (~> 3.10.0)
26
+ rspec-core (3.10.0)
27
+ rspec-support (~> 3.10.0)
28
+ rspec-expectations (3.10.0)
28
29
  diff-lcs (>= 1.2.0, < 2.0)
29
- rspec-support (~> 3.9.0)
30
- rspec-mocks (3.9.1)
30
+ rspec-support (~> 3.10.0)
31
+ rspec-mocks (3.10.0)
31
32
  diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.9.0)
33
- rspec-support (3.9.4)
33
+ rspec-support (~> 3.10.0)
34
+ rspec-support (3.10.0)
34
35
 
35
36
  PLATFORMS
36
37
  ruby
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ require "bundler/setup"
1
2
  require "bundler/gem_tasks"
2
3
  require "rspec/core/rake_task"
3
4
 
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ # Enable local usage from cloned repo
6
+ root = File.expand_path("../..", __FILE__)
7
+ $LOAD_PATH << "#{root}/lib" if File.exist?("#{root}/Gemfile")
8
+
9
+ require "turbo_tests"
10
+
11
+ TurboTests::CLI.new(ARGV).run
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "turbo_tests/version"
4
- require "bundler/setup"
5
-
6
3
  require "open3"
7
4
  require "fileutils"
8
5
  require "json"
@@ -16,6 +13,9 @@ require "turbo_tests/runner"
16
13
  require "turbo_tests/json_rows_formatter"
17
14
 
18
15
  module TurboTests
16
+ autoload :CLI, "turbo_tests/cli"
17
+ autoload :VERSION, "turbo_tests/version"
18
+
19
19
  FakeException = Struct.new(:backtrace, :message, :cause)
20
20
  class FakeException
21
21
  def self.from_obj(obj)
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "turbo_tests"
4
3
  require "optparse"
5
4
 
6
5
  module TurboTests
@@ -87,7 +86,7 @@ module TurboTests
87
86
  end
88
87
  end
89
88
 
90
- exit TurboTests::Runner.run(
89
+ success = TurboTests::Runner.run(
91
90
  formatters: formatters,
92
91
  tags: tags,
93
92
  files: @argv.empty? ? ["spec"] : @argv,
@@ -95,6 +94,12 @@ module TurboTests
95
94
  fail_fast: fail_fast,
96
95
  count: count,
97
96
  )
97
+
98
+ if success
99
+ exit 0
100
+ else
101
+ exit 1
102
+ end
98
103
  end
99
104
  end
100
105
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "json"
4
-
5
4
  require "parallel_tests/rspec/runner"
6
5
 
7
6
  module TurboTests
@@ -93,8 +92,9 @@ module TurboTests
93
92
  env["RUBYOPT"] = "-I#{File.expand_path("..", __dir__)}"
94
93
 
95
94
  command = [
96
- "bundle", "exec", "rspec",
95
+ ENV["BUNDLE_BIN_PATH"], "exec", "rspec",
97
96
  *extra_args,
97
+ "--seed", rand(2**16).to_s,
98
98
  "--format", "ParallelTests::RSpec::RuntimeLogger",
99
99
  "--out", @runtime_log,
100
100
  "--format", "TurboTests::JsonRowsFormatter",
@@ -1,3 +1,3 @@
1
1
  module TurboTests
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -9,24 +9,25 @@ Gem::Specification.new do |spec|
9
9
  spec.summary = "Runner for grosser/parallel_tests with incremental summarized output. Based on Discourse and Rubygems work in this area."
10
10
  spec.homepage = "https://github.com/serpapi/turbo_tests"
11
11
  spec.license = "MIT"
12
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
12
 
14
13
  spec.metadata["homepage_uri"] = spec.homepage
15
14
  spec.metadata["source_code_uri"] = "https://github.com/serpapi/turbo_tests"
16
15
  spec.metadata["changelog_uri"] = "https://github.com/serpapi/turbo_tests/releases"
17
16
 
18
- spec.add_dependency "rspec", "~> 3.9"
17
+ spec.required_ruby_version = ">= 2.4.0"
18
+
19
+ spec.add_dependency "rspec", "~> 3.10.0"
19
20
  spec.add_dependency "parallel_tests", "~> 3.3"
20
21
 
21
22
  spec.add_development_dependency "pry", "~> 0.13"
22
23
 
24
+ spec.add_runtime_dependency "bundler"
25
+
23
26
  # Specify which files should be added to the gem when it is released.
24
27
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
28
  spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
26
29
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
30
  end
28
31
 
29
- spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
- spec.require_paths = ["lib"]
32
+ spec.executables = ["turbo_tests"]
32
33
  end
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.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Zub
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-30 00:00:00.000000000 Z
11
+ date: 2020-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.9'
19
+ version: 3.10.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.9'
26
+ version: 3.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: parallel_tests
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.13'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description:
56
70
  email:
57
71
  - zaoooza92@gmail.com
@@ -60,6 +74,7 @@ executables:
60
74
  extensions: []
61
75
  extra_rdoc_files: []
62
76
  files:
77
+ - ".github/workflows/tests.yml"
63
78
  - ".gitignore"
64
79
  - ".rspec"
65
80
  - ".travis.yml"
@@ -69,9 +84,7 @@ files:
69
84
  - LICENSE.txt
70
85
  - README.md
71
86
  - Rakefile
72
- - bin/console
73
- - bin/setup
74
- - exe/turbo_tests
87
+ - bin/turbo_tests
75
88
  - lib/turbo_tests.rb
76
89
  - lib/turbo_tests/cli.rb
77
90
  - lib/turbo_tests/json_rows_formatter.rb
@@ -94,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
107
  requirements:
95
108
  - - ">="
96
109
  - !ruby/object:Gem::Version
97
- version: 2.3.0
110
+ version: 2.4.0
98
111
  required_rubygems_version: !ruby/object:Gem::Requirement
99
112
  requirements:
100
113
  - - ">="
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "turbo_tests"
5
-
6
- require "pry"
7
- Pry.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # frozen_string_literal: true
4
-
5
- require "turbo_tests/cli"
6
-
7
- TurboTests::CLI.new(ARGV).run