Skip to content

Commit 7a6d540

Browse files
committed
temp: change approach drastically
1 parent 70e2c0a commit 7a6d540

File tree

2 files changed

+6
-31
lines changed

2 files changed

+6
-31
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,3 @@ jobs:
100100
# TRACE_LIB: "on"
101101
# AR_LOG: "on"
102102
RAILS_MINITEST_PLUGIN: "1" # Make sure that we use the minitest plugin for profiling.
103-
- name: Archive culprits list
104-
if: always()
105-
uses: actions/upload-artifact@v4
106-
with:
107-
name: culprits-${{ matrix.number }}--${{ env.START_TIME }}.txt
108-
path: |
109-
tmp/culprits.txt

test/cases/helper_cockroachdb.rb

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -112,35 +112,17 @@ def run_one_method(klass, method_name, reporter)
112112
end
113113
end
114114

115+
$start = Time.now
115116
module ListTestsBefore
116-
@@before_the_test = true
117-
@@tests_before = []
118-
@@passed = nil
119-
120-
module_function
121-
122117
def teardown
123-
return unless @@before_the_test
124-
125118
if name == "test_create_with_query_cache"
126-
@@before_the_test = false
127-
@@passed = passed?
128-
raise Interrupt
129-
else
130-
@@tests_before.push name
119+
unless passed?
120+
puts "Seed: #{Minitest.seed}"
121+
File.write(ENV['GITHUB_STEP_SUMMARY'], "Seed: #{Minitest.seed}\nTime: #{Time.now - $start}\n")
122+
end
123+
exit
131124
end
132125
end
133-
134-
def after_run
135-
is = @@passed ? "innocent" : "culprit"
136-
FileUtils.mkdir_p("tmp")
137-
FileUtils.touch("tmp/culprits.txt")
138-
File.write("tmp/culprits.txt", @@tests_before.map{"#{_1} #{is}"}.join("\n") + "\n")
139-
end
140-
end
141-
142-
Minitest.after_run do
143-
ListTestsBefore.after_run
144126
end
145127

146128
module ActiveSupport

0 commit comments

Comments
 (0)