buildkite-test_collector 2.3.1 → 2.3.2

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: '09f0da65683acfa44ac43a124494f3c9d5d8e3067abf0b28a3aa979a6413489d'
4
- data.tar.gz: e7791580735083001493204451c79eae2e58ad5d51250f9c6535ca26bd8b169f
3
+ metadata.gz: 0b48c795c760f5a77634bc30024c344925036c3b4f935848caf6dcaf861b1692
4
+ data.tar.gz: 263e4faa13017fa5f8e1465dc76f245e05b3f26f703e933c87cb547b17e5dfbd
5
5
  SHA512:
6
- metadata.gz: 3937ba2cfed151fb5c62af03b0a4925d6a4f36be0a95432c39a6f6e5974198e6e9c44fa5f7138086415ffac7b4907f082f067ee33b9bac7cb32a2ccfad50647d
7
- data.tar.gz: bd956bc8de0375dcc657a7ed5f9a4256f0ba7b81de62dbc61ecb80ec2392eb6e9c57b298122f649659d16010189809a19dc4eb1f62e3c04626eb24917d53090c
6
+ metadata.gz: feaa2ec084069d17991bf5fda126b6b6d01fee4a807e4295bd644a02ccf30a02e9f1c0e912e2441347aee48f36bdae7eaa46ea4fe86075ac60e0b88424199aee
7
+ data.tar.gz: 7c31eafe74aa8cba48e74537940968c0b322b8939b33fa1cee2fdfb05600aa5ef9fc6192fb3b3c972bf4286edc3180cd375240eac2b6be8be08a4466bbed5567
data/CHANGELOG.md CHANGED
@@ -1,20 +1,31 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2.3.2
4
+
5
+ - Add support for Codeship #198 - @swebb
6
+ - Restore compatibility with older Ruby versions #201 - @gchan
7
+ - Report Ruby version to Test Analytics #203 - @gchan
8
+
3
9
  ## v2.3.1
10
+
4
11
  - Log standard error raised during upload #195 - @nprizal
5
12
 
6
13
  ## v2.3.0
14
+
7
15
  - Stop sending execution id and safeguard SecureRandom.uuid #192 - @niceking
8
16
  - Rescue from StandardError when sending upload request #191 - @niceking
9
17
  - Fix nil pointer #188 - @ChrisBr
10
18
 
11
19
  ## v2.2.0
20
+
12
21
  - Gzip payload of request to Upload API #183 - @niceking
13
22
 
14
23
  ## v2.1.0
24
+
15
25
  - Major change: deprecates websocket connection in favour of sending HTTP requests to the Upload API. In future, websocket support will be completely removed from Buildkite and only version 2.1+ of this gem will continue to work.
16
26
 
17
27
  ## v2.1.0.pre
28
+
18
29
  - Minitest plugin to use HTTP Upload API instead of websocket connection to send test data #178 #179 - @niceking
19
30
 
20
31
  ## v2.0.0.pre
@@ -32,6 +43,7 @@
32
43
  - Update collector argument in the Analytics::API payload #170 - @KatieWright26
33
44
 
34
45
  ## v1.4.1
46
+
35
47
  - Add in support to create file with trace data #167
36
48
 
37
49
  ## v1.3.1
data/Gemfile.lock CHANGED
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- buildkite-test_collector (2.3.1)
4
+ buildkite-test_collector (2.3.2)
5
5
  activesupport (>= 4.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (7.0.4.3)
10
+ activesupport (7.0.7.2)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
14
14
  tzinfo (~> 2.0)
15
15
  concurrent-ruby (1.2.2)
16
16
  diff-lcs (1.4.4)
17
- i18n (1.13.0)
17
+ i18n (1.14.1)
18
18
  concurrent-ruby (~> 1.0)
19
- minitest (5.18.0)
19
+ minitest (5.19.0)
20
20
  rake (13.0.6)
21
21
  rspec (3.10.0)
22
22
  rspec-core (~> 3.10.0)
data/README.md CHANGED
@@ -7,7 +7,7 @@ Official [Buildkite Test Analytics](https://buildkite.com/test-analytics) collec
7
7
 
8
8
  ⚒ **Supported test frameworks:** RSpec, Minitest, and [more coming soon](https://github.com/buildkite/test-collector-ruby/issues?q=is%3Aissue+is%3Aopen+label%3A%22test+frameworks%22).
9
9
 
10
- 📦 **Supported CI systems:** Buildkite, GitHub Actions, CircleCI, and others via the `BUILDKITE_ANALYTICS_*` environment variables.
10
+ 📦 **Supported CI systems:** Buildkite, GitHub Actions, CircleCI, Codeship, and others via the `BUILDKITE_ANALYTICS_*` environment variables.
11
11
 
12
12
  ## 👉 Installing
13
13
 
data/buildkite.yaml CHANGED
@@ -1,8 +1,41 @@
1
1
  steps:
2
- - label: ":rspec: Tests"
2
+ - label: ":rspec: Tests :ruby: 3.3-rc"
3
3
  command:
4
4
  - "bundle"
5
5
  - "bundle exec rake"
6
6
  plugins:
7
7
  - docker#v3.7.0:
8
- image: 445615400570.dkr.ecr.us-east-1.amazonaws.com/ecr-public/docker/library/ruby:3.1.4
8
+ image: "445615400570.dkr.ecr.us-east-1.amazonaws.com/ecr-public/docker/library/ruby:3.3-rc"
9
+ soft_fail: true
10
+
11
+ - label: ":rspec: Tests :ruby: {{matrix}}"
12
+ command:
13
+ - "bundle"
14
+ - "bundle exec rake"
15
+ plugins:
16
+ - docker#v3.7.0:
17
+ image: "445615400570.dkr.ecr.us-east-1.amazonaws.com/ecr-public/docker/library/ruby:{{matrix}}"
18
+ matrix:
19
+ - "latest"
20
+ - "3.2"
21
+ - "3.1"
22
+ - "3.0"
23
+ - "2.7"
24
+
25
+ - group: ":rspec: Legacy Ruby :ruby:"
26
+ steps:
27
+ - label: ":rspec: Tests :ruby: {{matrix}}"
28
+ command:
29
+ - "gem install bundler:2.3.25"
30
+ - "bundle"
31
+ - "bundle exec rake"
32
+ plugins:
33
+ - docker#v3.7.0:
34
+ # Images for older Ruby versions aren't available on AWS ECR
35
+ # so fall back to Docker Hub
36
+ image: "ruby:{{matrix}}"
37
+ matrix:
38
+ - "2.6"
39
+ - "2.5"
40
+ - "2.4"
41
+ - "2.3"
@@ -17,6 +17,7 @@ class Buildkite::TestCollector::CI
17
17
  return buildkite if ENV["BUILDKITE_BUILD_ID"]
18
18
  return github_actions if ENV["GITHUB_RUN_NUMBER"]
19
19
  return circleci if ENV["CIRCLE_BUILD_NUM"]
20
+ return codeship if ENV["CI_NAME"] == "codeship"
20
21
  return generic if ENV["CI"]
21
22
 
22
23
  {
@@ -36,9 +37,10 @@ class Buildkite::TestCollector::CI
36
37
  "message" => ENV["BUILDKITE_ANALYTICS_MESSAGE"],
37
38
  "execution_name_prefix" => ENV["BUILDKITE_ANALYTICS_EXECUTION_NAME_PREFIX"],
38
39
  "execution_name_suffix" => ENV["BUILDKITE_ANALYTICS_EXECUTION_NAME_SUFFIX"],
40
+ "language_version" => RUBY_VERSION,
39
41
  "version" => Buildkite::TestCollector::VERSION,
40
42
  "collector" => "ruby-#{Buildkite::TestCollector::NAME}",
41
- }.compact
43
+ }.select { |_, value| !value.nil? }
42
44
  end
43
45
 
44
46
  def generic
@@ -82,4 +84,16 @@ class Buildkite::TestCollector::CI
82
84
  "number" => ENV["CIRCLE_BUILD_NUM"],
83
85
  }
84
86
  end
87
+
88
+ def codeship
89
+ {
90
+ "CI" => "codeship",
91
+ "key" => "#{ENV["CI_BUILD_ID"]}",
92
+ "url" => ENV["CI_PULL_REQUEST"],
93
+ "branch" => ENV["CI_BRANCH"],
94
+ "commit_sha" => ENV["CI_COMMIT_ID"],
95
+ "number" => nil,
96
+ "message" => ENV["CI_COMMIT_MESSAGE"],
97
+ }
98
+ end
85
99
  end
@@ -38,7 +38,7 @@ module Buildkite::TestCollector::MinitestPlugin
38
38
  failure_reason: failure_reason,
39
39
  failure_expanded: failure_expanded,
40
40
  history: history,
41
- ).with_indifferent_access.compact
41
+ ).with_indifferent_access.select { |_, value| !value.nil? }
42
42
  end
43
43
 
44
44
  private
@@ -50,7 +50,7 @@ module Buildkite::TestCollector::MinitestPlugin
50
50
  end
51
51
 
52
52
  def file_name
53
- @file_name ||= File.join('./', source_location[0].delete_prefix(project_dir))
53
+ @file_name ||= File.join('./', source_location[0].sub(/\A#{project_dir}/, ""))
54
54
  end
55
55
 
56
56
  def line_number
@@ -74,7 +74,7 @@ module Buildkite::TestCollector::MinitestPlugin
74
74
  # remove the first line of message from the first failure
75
75
  # to avoid duplicate line in Test Analytics UI
76
76
  messages = strip_invalid_utf8_chars(failure.message).split("\n")
77
- messages = messages[1..] if index.zero?
77
+ messages = messages[1..-1] if index.zero?
78
78
 
79
79
  {
80
80
  expanded: messages,
@@ -32,7 +32,7 @@ module Buildkite::TestCollector::RSpecPlugin
32
32
  failure_reason: failure_reason,
33
33
  failure_expanded: failure_expanded,
34
34
  history: history,
35
- ).with_indifferent_access.compact
35
+ ).with_indifferent_access.select { |_, value| !value.nil? }
36
36
  end
37
37
 
38
38
  private
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Buildkite
4
4
  module TestCollector
5
- VERSION = "2.3.1"
5
+ VERSION = "2.3.2"
6
6
  NAME = "buildkite-test_collector"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildkite-test_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Buildkite
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-02 00:00:00.000000000 Z
11
+ date: 2023-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport