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

chore(test): add github summary #292

Closed
wants to merge 1 commit into from
Closed
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 Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ group :development, :test do
gem "mocha", "~> 1.14.0"
gem "sqlite3", "~> 1.4.4"

gem "minitest-github_action_reporter", github: "BuonOmo/minitest-github_action_reporter", require: "minitest/github_action_reporter_plugin"
gem "minitest", "~> 5.15.0"
end
17 changes: 17 additions & 0 deletions test/cases/helper_cockroachdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@
Bundler.setup

require "minitest/excludes"
require "minitest/github_action_reporter"

# Turn on debugging for the test environment
ENV['DEBUG_COCKROACHDB_ADAPTER'] = "1"

# Load ActiveRecord test helper
require "cases/helper"

# Allow the GithubAction reporter to link to both
# our codebase and the Rails codebase.
module Minitest
module GithubActionReporterExt
def gh_link(loc)
return super unless loc.include?("/gems/")

path, _, line = loc[%r(/(?:test|spec)/.*)][1..].rpartition(":")

rails_version = "v#{ActiveRecord::VERSION::STRING}"
"#{ENV["GITHUB_SERVER_URL"]}/rails/rails/blob/#{rails_version}/activerecord/#{path}#L#{line}"
end
end
GithubActionReporter.prepend(GithubActionReporterExt)
end

# Load the CockroachDB specific schema. It replaces ActiveRecord's PostgreSQL
# specific schema.
def load_cockroachdb_specific_schema
Expand Down