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

run a verbose test #353

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
verbose test
  • Loading branch information
BuonOmo committed Jan 21, 2025
commit 41aaadca29aa71d4343d07ba69ada04683e8e2fc
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,16 @@ jobs:
done
cat ${{ github.workspace }}/setup.sql | cockroach sql --insecure
- name: Test
run: bundle exec rake test TESTOPTS='--profile=5'
run: AR_LOG=summary bundle exec rake test TESTOPTS='--profile=5 --verbose'
- name: Upload queries file
uses: actions/upload-artifact@v3
if: always()
with:
name: query_time.json
path: tmp/query_time.json
- name: Upload stackprof dump
uses: actions/upload-artifact@v3
if: always()
with:
name: stackprof.dump
path: tmp/stackprof.dump
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ group :development, :test do
gem "minitest-github_action_reporter", github: "BuonOmo/minitest-github_action_reporter", require: "minitest/github_action_reporter_plugin"
gem "ostruct", "~> 0.6"

gem "stackprof"

# Gems used for tests meta-programming.
gem "parser"

Expand Down
4 changes: 4 additions & 0 deletions test/cases/helper_cockroachdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,7 @@ def header(stream)
class BaseCompatibilityTest < ActiveRecord::TestCase
self.use_transactional_tests = false
end

require "stackprof"
StackProf.start(mode: :wall, interval: 1000)
Minitest.after_run { StackProf.stop; StackProf.results("tmp/stackprof.dump") }