FIx CI build freezing (#398)

* Kill vim server

* Fix incorrect usage of rspec

* Add build stage to CI

* Try using new server for each run

* Sort and uniq test files
This commit is contained in:
German Lashevich 2019-05-01 23:52:55 +02:00 committed by Adam Stankiewicz
parent 9fd5c11a20
commit e8245dbf17
3 changed files with 8 additions and 5 deletions

View File

@ -7,6 +7,5 @@ addons:
packages: packages:
- vim-gtk - vim-gtk
before_script: before_script:
- "export DISPLAY=:99.0" - "./build"
- "sh -e /etc/init.d/xvfb start" script: xvfb-run bundle exec rspec --format=documentation
script: bundle exec rspec --format=documentation

View File

@ -9,7 +9,7 @@ describe "My Vim plugin" do
extensions = extensions.split(/[\n,]/) extensions = extensions.split(/[\n,]/)
extensions.each do |ext| extensions.sort!.uniq!.each do |ext|
if ext.match?(/^[a-z\.]+$/i) if ext.match?(/^[a-z\.]+$/i)
it "should parse #{ext} file" do it "should parse #{ext} file" do
Timeout::timeout(20) do Timeout::timeout(20) do
@ -21,4 +21,8 @@ describe "My Vim plugin" do
end end
end end
end end
after(:all) do
vim.kill
end
end end

View File

@ -4,7 +4,7 @@ require 'vimrunner/rspec'
$plugin_path = File.expand_path('../..', __FILE__) $plugin_path = File.expand_path('../..', __FILE__)
Vimrunner::RSpec.configure do |config| Vimrunner::RSpec.configure do |config|
config.reuse_server = true config.reuse_server = false
# Decide how to start a Vim instance. In this block, an instance should be # Decide how to start a Vim instance. In this block, an instance should be
# spawned and set up with anything project-specific. # spawned and set up with anything project-specific.