knapsack 1.18.0 → 1.19.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: b673e54c4a69c274d1c0bea7d3ab53d603ad95d178550a6d787904803dcc728f
4
- data.tar.gz: b88dd14ffeb3dc33648ae953fc789d63cbc25a4be72d643dea6acddc09bc3f3e
3
+ metadata.gz: 6a50a48925cacc27dbadfc763effe1061eb2dc6dec00217e23e304080e74faee
4
+ data.tar.gz: 60b6827c19012025fa3651a6e6017b3351eee25cd76cc5c0795625bd1d6dfe09
5
5
  SHA512:
6
- metadata.gz: 2837e7b8732843c8b778c82c26c57c2f5757c6402c464a6e57f71c046c8c07f1674d9ae124ec6759808d81d557684cc62f7a5c1dda331a9265b1ebfc53cc8228
7
- data.tar.gz: 9270341918460fb18dad56753b6cba0308783940c601b6cbd88331629c3f4453fd3e15faa355a8830822cdd98b449e8b96c1f7a58015cff385ca78f0108a8fd4
6
+ metadata.gz: 1ec9fe137cf43655aeab8bf89c969b0969485de1d16ea4de287d3eeb08bfa9b486b3aff58b632241792464f4d175b30d433e4901c51f2cb2cb6b71e730d556b5
7
+ data.tar.gz: 94842148dfb9ae8756a127decaabb8bdf0be8d0e3a3b8d708939e46b2ee214c3fef847a82d16562368ff4a0cdcf6cdec7aa7751a4045a69eebaa47c199e5b6e4
@@ -2,7 +2,6 @@
2
2
  sudo: false
3
3
  language: ruby
4
4
  rvm:
5
- - 1.9.3
6
5
  - 2.0.0
7
6
  - 2.1
8
7
  - 2.2
@@ -10,6 +9,7 @@ rvm:
10
9
  - 2.4
11
10
  - 2.5
12
11
  - 2.6
12
+ - 2.7
13
13
  addons:
14
14
  code_climate:
15
15
  repo_token: 38686058eed480dd0fcf8bce9015733e0bae88e44e30f4a1ac63df8aec2f86d8
@@ -2,6 +2,14 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 1.19.0
6
+
7
+ * Add support for Bitbucket Pipelines
8
+
9
+ https://github.com/ArturT/knapsack/pull/97
10
+
11
+ https://github.com/ArturT/knapsack/compare/v1.18.0...v1.19.0
12
+
5
13
  ### 1.18.0
6
14
 
7
15
  * Add support for Semaphore 2.0
data/README.md CHANGED
@@ -1 +1,36 @@
1
- # [Open README](http://docs.knapsackpro.com/ruby/knapsack)
1
+ # knapsack gem
2
+
3
+ Knapsack splits tests evenly across parallel CI nodes to run fast CI build and save you time.
4
+
5
+ | | knapsack gem | knapsack_pro gem |
6
+ | -------------------------------------------- | ------------ | ---------------- |
7
+ | __Is free__ | ✓ Yes | ✓ Yes, [free plan](https://knapsackpro.com?utm_source=github&utm_medium=readme&utm_campaign=knapsack_gem&utm_content=free_plan) |
8
+ | __Regular Mode - a static tests split__ | ✓ Yes | ✓ Yes |
9
+ | __Queue Mode - a dynamic tests split__ <br>([ensures all CI nodes finish work at the same time](https://docs.knapsackpro.com/2020/how-to-speed-up-ruby-and-javascript-tests-with-ci-parallelisation)) | No | ✓ Yes |
10
+ | __Auto [split slow RSpec test file](https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it) between parallel CI nodes__ <br>(a single test file can be auto split by test examples between parallel jobs) | No | ✓ Yes |
11
+ | Tracking tests timing per commit, branch | No | ✓ Yes |
12
+ | Support for other programming languages | No | ✓ Yes |
13
+ | Support for CI providers | limited | ✓ Yes |
14
+ | __Installation README__ | [Install README](http://docs.knapsackpro.com/ruby/knapsack) | [Install README](https://docs.knapsackpro.com/integration/) |
15
+
16
+ [Features of knapsack vs knapsack_pro Ruby gem](https://knapsackpro.com/features/ruby_knapsack_pro_vs_knapsack?utm_source=github&utm_medium=readme&utm_campaign=knapsack_gem&utm_content=ruby_knapsack_pro_vs_knapsack)
17
+
18
+ # Do you use Heroku?
19
+
20
+ Do you know Knapsack Pro Ruby gem is available as Heroku add-on that's currently in beta and it's free to all beta users? It works with your current CI server.
21
+ https://elements.heroku.com/addons/knapsack-pro
22
+
23
+ Knapsack Pro has Queue Mode that will split Ruby & JS tests in a dynamic way across parallel CI nodes to ensure each parallel job takes a similar time. Thanks to that there is no bottleneck in your CI pipelines.
24
+
25
+ __See introduction how the Knapsack Pro add-on works__
26
+ https://youtu.be/rmXES2N0_QU
27
+
28
+ You may also find useful article how to run parallel dynos on Heroku CI to complete tests faster
29
+ https://docs.knapsackpro.com/2019/how-to-run-tests-faster-on-heroku-ci-with-parallel-dynos
30
+
31
+ ## Do you know
32
+
33
+ * Knapsack Pro is risk-free integration! Knapsack Pro runs tests in Fallback Mode if your CI servers can't reach our API for any reason.
34
+ * We don't need access to your repository. Knapsack Pro is just wrapper around test runner like RSpec, Cucumber, Minitest etc.
35
+ * Hundreds of developers use Knapsack Pro every day to run fast CI builds.
36
+ * It works with other programming languages.
@@ -7,11 +7,11 @@ module Knapsack
7
7
  end
8
8
 
9
9
  def ci_node_total
10
- ENV['CI_NODE_TOTAL'] || ENV['CIRCLE_NODE_TOTAL'] || ENV['SEMAPHORE_JOB_COUNT'] || ENV['SEMAPHORE_THREAD_COUNT'] || ENV['BUILDKITE_PARALLEL_JOB_COUNT'] || ENV['SNAP_WORKER_TOTAL'] || 1
10
+ ENV['CI_NODE_TOTAL'] || ENV['CIRCLE_NODE_TOTAL'] || ENV['SEMAPHORE_JOB_COUNT'] || ENV['SEMAPHORE_THREAD_COUNT'] || ENV['BUILDKITE_PARALLEL_JOB_COUNT'] || ENV['SNAP_WORKER_TOTAL'] || ENV['BITBUCKET_PARALLEL_STEP_COUNT'] || 1
11
11
  end
12
12
 
13
13
  def ci_node_index
14
- gitlab_ci_node_index || ENV['CI_NODE_INDEX'] || ENV['CIRCLE_NODE_INDEX'] || semaphore_job_index || semaphore_current_thread || ENV['BUILDKITE_PARALLEL_JOB'] || snap_ci_worker_index || 0
14
+ gitlab_ci_node_index || ENV['CI_NODE_INDEX'] || ENV['CIRCLE_NODE_INDEX'] || semaphore_job_index || semaphore_current_thread || ENV['BUILDKITE_PARALLEL_JOB'] || snap_ci_worker_index || ENV['BITBUCKET_PARALLEL_STEP'] || 0
15
15
  end
16
16
 
17
17
  def test_file_pattern
@@ -1,3 +1,3 @@
1
1
  module Knapsack
2
- VERSION = '1.18.0'
2
+ VERSION = '1.19.0'
3
3
  end
@@ -46,6 +46,11 @@ describe Knapsack::Config::Env do
46
46
  before { stub_const("ENV", { 'SNAP_WORKER_TOTAL' => 6 }) }
47
47
  it { should eql 6 }
48
48
  end
49
+
50
+ context 'when BITBUCKET_PARALLEL_STEP_COUNT has value' do
51
+ before { stub_const("ENV", { 'BITBUCKET_PARALLEL_STEP_COUNT' => 8 }) }
52
+ it { should eql 8 }
53
+ end
49
54
  end
50
55
 
51
56
  context "when ENV doesn't exist" do
@@ -91,6 +96,11 @@ describe Knapsack::Config::Env do
91
96
  before { stub_const("ENV", { 'SNAP_WORKER_INDEX' => 4 }) }
92
97
  it { should eql 3 }
93
98
  end
99
+
100
+ context 'when BITBUCKET_PARALLEL_STEP has value' do
101
+ before { stub_const("ENV", { 'BITBUCKET_PARALLEL_STEP' => 7 }) }
102
+ it { should eql 7 }
103
+ end
94
104
  end
95
105
 
96
106
  context "when ENV doesn't exist" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-23 00:00:00.000000000 Z
11
+ date: 2020-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -285,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
285
285
  - !ruby/object:Gem::Version
286
286
  version: '0'
287
287
  requirements: []
288
- rubygems_version: 3.0.3
288
+ rubygems_version: 3.0.6
289
289
  signing_key:
290
290
  specification_version: 4
291
291
  summary: Knapsack splits tests across CI nodes and makes sure that tests will run