Commit 0729e511cd77652c7cb2d1500c5b7d1d7ee2cbbd
1 parent
a761fb2d
Exists in
test_language
Test languages on Travis
Showing
3 changed files
with
17 additions
and
1 deletions
Show diff stats
test/ci/install_elasticsearch.sh
... | ... | @@ -21,3 +21,9 @@ fi |
21 | 21 | cd $CACHE_DIR |
22 | 22 | bin/elasticsearch -d |
23 | 23 | for i in {1..12}; do wget -O- -v http://127.0.0.1:9200/ && break || sleep 5; done |
24 | + | |
25 | +bin/elasticsearch-plugin install analysis-kuromoji | |
26 | +bin/elasticsearch-plugin install analysis-nori | |
27 | +bin/elasticsearch-plugin install analysis-smartcn | |
28 | +bin/elasticsearch-plugin install analysis-stempel | |
29 | +bin/elasticsearch-plugin install analysis-ukrainian | ... | ... |
test/language_test.rb
... | ... | @@ -2,12 +2,14 @@ require_relative "test_helper" |
2 | 2 | |
3 | 3 | class LanguageTest < Minitest::Test |
4 | 4 | def setup |
5 | - skip unless ENV["TEST_LANGUAGE"] | |
5 | + skip "Requires plugin" unless ci? || ENV["TEST_LANGUAGE"] | |
6 | 6 | |
7 | 7 | Song.destroy_all |
8 | 8 | end |
9 | 9 | |
10 | 10 | def test_chinese |
11 | + skip if ci? | |
12 | + | |
11 | 13 | # requires https://github.com/medcl/elasticsearch-analysis-ik |
12 | 14 | with_options(Song, language: "chinese") do |
13 | 15 | store_names ["中华人民共和国国歌"], Song |
... | ... | @@ -38,6 +40,8 @@ class LanguageTest < Minitest::Test |
38 | 40 | end |
39 | 41 | |
40 | 42 | def test_korean |
43 | + skip if ci? | |
44 | + | |
41 | 45 | # requires https://github.com/open-korean-text/elasticsearch-analysis-openkoreantext |
42 | 46 | with_options(Song, language: "korean") do |
43 | 47 | store_names ["한국어를 처리하는 예시입니닼ㅋㅋ"], Song |
... | ... | @@ -74,6 +78,8 @@ class LanguageTest < Minitest::Test |
74 | 78 | end |
75 | 79 | |
76 | 80 | def test_vietnamese |
81 | + skip if ci? | |
82 | + | |
77 | 83 | # requires https://github.com/duydo/elasticsearch-analysis-vietnamese |
78 | 84 | with_options(Song, language: "vietnamese") do |
79 | 85 | store_names ["công nghệ thông tin Việt Nam"], Song | ... | ... |