From 468b7403e933af1cc2d08356340a48e5b2fb45e1 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Sun, 26 Feb 2017 14:18:22 -0700 Subject: [PATCH 1/2] Test should be passing block to RSpec wait_for Fixes flaky test --- spec/integrations/client_zpty_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integrations/client_zpty_spec.rb b/spec/integrations/client_zpty_spec.rb index fb7bbeb..8f1550e 100644 --- a/spec/integrations/client_zpty_spec.rb +++ b/spec/integrations/client_zpty_spec.rb @@ -5,6 +5,6 @@ describe 'a running zpty command' do sleep 1 # Give a little time for precmd hooks to run session.run_command('zpty -t kitty; echo $?') - wait_for(session.content).to end_with("\n0") + wait_for { session.content }.to end_with("\n0") end end From 39762ecd971de53daa0784a57c27fdf8254722e8 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Sun, 26 Feb 2017 14:19:09 -0700 Subject: [PATCH 2/2] Set up circle ci --- .editorconfig | 4 ++++ Makefile | 1 + README.md | 2 ++ circle.yml | 12 ++++++++++++ 4 files changed, 19 insertions(+) create mode 100644 circle.yml diff --git a/.editorconfig b/.editorconfig index b40bc96..ddabb17 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,3 +12,7 @@ indent_style = space [*.rb] indent_style = space indent_size = 2 + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/Makefile b/Makefile index 51d1b0c..d5d162c 100644 --- a/Makefile +++ b/Makefile @@ -32,4 +32,5 @@ clean: .PHONY: test test: all + @test -n "$$TEST_ZSH_BIN" && echo "Testing zsh binary: $(TEST_ZSH_BIN)" || true bundle exec rspec $(TESTS) diff --git a/README.md b/README.md index 85cac70..9b363da 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ _[Fish](http://fishshell.com/)-like fast/unobtrusive autosuggestions for zsh._ It suggests commands as you type, based on command history. +[![CircleCI](https://circleci.com/gh/zsh-users/zsh-autosuggestions.svg?style=svg)](https://circleci.com/gh/zsh-users/zsh-autosuggestions) + diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..5e3a6f6 --- /dev/null +++ b/circle.yml @@ -0,0 +1,12 @@ +machine: + environment: + ZSH_VERSIONS: 5.0.8 5.1.1 5.2 5.3.1 + +dependencies: + pre: + - for v in $(echo $ZSH_VERSIONS | awk "{ for (i=$((1+CIRCLE_NODE_INDEX));i<=NF;i+=$CIRCLE_NODE_TOTAL) print \$i }"); do wget https://sourceforge.net/projects/zsh/files/zsh/$v/zsh-$v.tar.gz && tar xzf zsh-$v.tar.gz && cd zsh-$v && ./configure && sudo make install || exit 1; done + +test: + override: + - for v in $(echo $ZSH_VERSIONS | awk "{ for (i=$((1+CIRCLE_NODE_INDEX));i<=NF;i+=$CIRCLE_NODE_TOTAL) print \$i }"); do TEST_ZSH_BIN=/usr/local/bin/zsh-$v make test || exit 1; done: + parallel: true