File tree Expand file tree Collapse file tree 2 files changed +26
-11
lines changed Expand file tree Collapse file tree 2 files changed +26
-11
lines changed Original file line number Diff line number Diff line change 14
14
15
15
jobs :
16
16
ci :
17
- name : " Run Tests (${{ matrix.label }})"
17
+ name : " Run Tests (Ruby ${{ matrix.ruby_version }}, GSL: ${{ matrix.gsl }})"
18
18
runs-on : " ubuntu-latest"
19
19
env :
20
20
# See https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby#matrix-of-gemfiles
21
21
BUNDLE_GEMFILE : ${{ matrix.gemfile }}
22
22
strategy :
23
23
fail-fast : false
24
24
matrix :
25
+ ruby_version : ["2.7", "3.0", "3.1", "jruby-9.3.4.0"]
26
+ gsl : [true, false]
27
+ # We use `include` to assign the correct Gemfile for each ruby_version
25
28
include :
26
- - label : Ruby 2.7
27
- ruby_version : " 2.7"
29
+ - ruby_version : " 2.7"
28
30
gemfile : Gemfile
29
- - label : Ruby 3.0
30
- ruby_version : " 3.0"
31
+ - ruby_version : " 3.0"
31
32
gemfile : Gemfile
32
- - label : Ruby 3.1
33
- ruby_version : " 3.1"
33
+ - ruby_version : " 3.1"
34
34
gemfile : Gemfile
35
- - label : JRuby 9.3.4.0
36
- ruby_version : " jruby-9.3.4.0"
35
+ - ruby_version : " jruby-9.3.4.0"
37
36
gemfile : Gemfile-jruby
37
+ exclude :
38
+ # Ruby 3.0 does not work with the latest released gsl gem
39
+ # https://github.com/SciRuby/rb-gsl/issues/67
40
+ - ruby_version : " 3.0"
41
+ gsl : true
42
+ # Ruby 3.1 does not work with the latest released gsl gem
43
+ # https://github.com/SciRuby/rb-gsl/issues/67
44
+ - ruby_version : " 3.1"
45
+ gsl : true
46
+ # jruby-9.3.4.0 doesn't easily build the gsl gem on a GitHub worker. Skipping for now.
47
+ - ruby_version : " jruby-9.3.4.0"
48
+ gsl : true
38
49
steps :
39
50
- name : Checkout Repository
40
51
uses : actions/checkout@v3
43
54
with :
44
55
ruby-version : ${{ matrix.ruby_version }}
45
56
bundler-cache : true
57
+ - name : Install GSL Gem
58
+ if : ${{ matrix.gsl }}
59
+ run : gem install gsl
46
60
- name : Run Minitest based tests
47
61
run : script/test
62
+
48
63
services :
49
64
redis :
50
65
image : redis
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ def test_cached_content_node_option
163
163
end
164
164
165
165
def test_clears_cached_content_node_cache
166
- return unless $GSL
166
+ skip "transposed_search_vector is only used by GSL implementation" unless $GSL
167
167
168
168
lsi = ClassifierReborn ::LSI . new ( cache_node_vectors : true )
169
169
lsi . add_item @str1 , 'Dog'
@@ -192,7 +192,7 @@ def test_keyword_search
192
192
end
193
193
194
194
def test_invalid_searching_when_using_gsl
195
- return unless $GSL
195
+ skip "Only GSL currently raises invalid search error" unless $GSL
196
196
197
197
lsi = ClassifierReborn ::LSI . new
198
198
lsi . add_item @str1 , 'Dog'
You can’t perform that action at this time.
0 commit comments