Skip to content

Commit

Permalink
verbose test
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonOmo committed Jan 21, 2025
1 parent c02cf48 commit 41aaadc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
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") }

0 comments on commit 41aaadc

Please sign in to comment.