File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 72
72
- run : bundle install --jobs 4 --retry 3 --without "nmatrix python"
73
73
74
74
- run : bundle exec rake
75
+ env :
76
+ TIMEOUT_SEC : 180
75
77
76
78
- run : rake build
77
79
Original file line number Diff line number Diff line change 65
65
- run : bundle install --jobs 4 --retry 3 --without "numo python"
66
66
67
67
- run : bundle exec rake
68
+ env :
69
+ TIMEOUT_SEC : 180
68
70
69
71
- run : rake build
70
72
Original file line number Diff line number Diff line change 86
86
- run : bundle exec rake
87
87
env :
88
88
PYTHON : python
89
+ TIMEOUT_SEC : 180
89
90
continue-on-error : ${{ matrix.python == '2.x' }}
Original file line number Diff line number Diff line change 4
4
# $VERBOSE = true
5
5
6
6
require "pathname"
7
+ require "timeout"
7
8
8
9
base_dir = Pathname ( __dir__ ) . parent . expand_path
9
10
16
17
17
18
require_relative "helper"
18
19
19
- exit ( Test ::Unit ::AutoRunner . run ( true , test_dir . to_s ) )
20
+ run_test = lambda { Test ::Unit ::AutoRunner . run ( true , test_dir . to_s ) }
21
+ timeout_sec = ENV . fetch ( "TIMEOUT_SEC" , "0" ) . to_i
22
+ status = if timeout_sec > 0
23
+ Timeout . timeout ( timeout_sec ) { run_test . ( ) }
24
+ else
25
+ run_test . ( )
26
+ end
27
+ exit ( status )
You can’t perform that action at this time.
0 commit comments