Browse Source

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
pull/408/head
German Lashevich 5 months ago
parent
commit
e8245dbf17
3 changed files with 8 additions and 5 deletions
  1. 2
    3
      .travis.yml
  2. 5
    1
      spec/loading_spec.rb
  3. 1
    1
      spec/spec_helper.rb

+ 2
- 3
.travis.yml View File

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

+ 5
- 1
spec/loading_spec.rb View File

@@ -9,7 +9,7 @@ describe "My Vim plugin" do

extensions = extensions.split(/[\n,]/)

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

after(:all) do
vim.kill
end
end

+ 1
- 1
spec/spec_helper.rb View File

@@ -4,7 +4,7 @@ require 'vimrunner/rspec'
$plugin_path = File.expand_path('../..', __FILE__)

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
# spawned and set up with anything project-specific.

Loading…
Cancel
Save