Skip to content

Commit

Permalink
chore(test): add github summary
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonOmo committed Sep 25, 2023
1 parent 27cf9aa commit dc20826
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ 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
15 changes: 15 additions & 0 deletions test/cases/helper_cockroachdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@
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"

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

0 comments on commit dc20826

Please sign in to comment.