Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install and set up Buildkite Test Analytics #4688

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ jobs:
DISABLE_ACTIVE_STORAGE: << parameters.paperclip >>
RAILS_VERSION: "~> << parameters.rails >>"
USE_LEGACY_EVENTS: << parameters.legacy >>
BUILDKITE_ANALYTICS_EXECUTION_NAME_PREFIX: "(<< parameters.ruby >>:<< parameters.rails >>:<< parameters.database >>:<< parameters.paperclip >>)"
steps:
- setup
- when:
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ group :utils do
gem 'gem-release', require: false
end

gem 'buildkite-test_collector', require: false, group: :test

gem 'rspec_junit_formatter', require: false, group: :ci

# Documentation
Expand Down
3 changes: 3 additions & 0 deletions api/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
SimpleCov.start('rails')
end

require 'spree/testing_support/buildkite_test_collector'
Spree::TestingSupport::BuildkiteTestCollector.enable

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'

Expand Down
3 changes: 3 additions & 0 deletions backend/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
SimpleCov.start('rails')
end

require 'spree/testing_support/buildkite_test_collector'
Spree::TestingSupport::BuildkiteTestCollector.enable

# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
Expand Down
13 changes: 13 additions & 0 deletions core/lib/spree/testing_support/buildkite_test_collector.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require "buildkite/test_collector"

module Spree
module TestingSupport
module BuildkiteTestCollector
def self.enable
Buildkite::TestCollector.configure(hook: :rspec)
end
end
end
end
3 changes: 3 additions & 0 deletions core/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
SimpleCov.start('rails')
end

require 'spree/testing_support/buildkite_test_collector'
Spree::TestingSupport::BuildkiteTestCollector.enable

require 'rspec/core'

require 'spree/testing_support/partial_double_verification'
Expand Down