This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from sevos/zeus-0.15
Add support for Zeus 0.15
- Loading branch information
Showing
24 changed files
with
177 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--color | ||
--format progress | ||
--require spec_helper | ||
--require spec_helper | ||
--exclude-pattern 'spec/dummy/**/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
AllCops: | ||
Exclude: | ||
- bin/**/* | ||
- vendor/**/* | ||
- spec/dummy/vendor/**/* | ||
|
||
Documentation: | ||
Enabled: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
appraise 'rails-3-zeus-0.15' do | ||
gem 'rails', '3.2.21' | ||
gem 'zeus', '0.15.4' | ||
end | ||
|
||
appraise 'rails-4-zeus-0.15' do | ||
gem 'rails', '4.2.3' | ||
gem 'zeus', '0.15.4' | ||
end | ||
|
||
appraise 'rails-3-zeus-0.13' do | ||
gem 'rails', '3.2.21' | ||
gem 'zeus', '0.13.3' | ||
end | ||
|
||
appraise 'rails-4-zeus-0.13' do | ||
gem 'rails', '4.2.3' | ||
gem 'zeus', '0.13.3' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
dependencies: | ||
pre: | ||
- echo rvm_autoupdate_flag=0 >> ~/.rvmrc | ||
- rvm install 2.2 | ||
- rvm install 2.1 | ||
- rvm install 2.0 | ||
- rvm install 1.9 | ||
|
||
cache_directories: | ||
- '~/.rvm/gems/' | ||
- /home/ubuntu/.rvm/gems/ruby-2.2.0 | ||
- /home/ubuntu/.rvm/gems/ruby-2.1.5 | ||
- /home/ubuntu/.rvm/gems/ruby-2.0.0-p598 | ||
- /home/ubuntu/.rvm/gems/ruby-1.9.3-p551 | ||
|
||
override: | ||
- rvm-exec 2.2 bash -c 'bundle check || bundle install' | ||
- rvm-exec 2.1 bash -c 'bundle check || bundle install' | ||
- rvm-exec 2.0 bash -c 'bundle check || bundle install' | ||
- rvm-exec 1.9 bash -c 'bundle check || bundle install' | ||
- rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' | ||
- rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' | ||
- rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' | ||
- rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' | ||
- rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' | ||
- rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' | ||
- rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' | ||
- rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' | ||
- rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' | ||
- rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' | ||
- rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' | ||
- rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' | ||
- rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' | ||
- rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' | ||
- rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' | ||
- rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' | ||
|
||
test: | ||
override: | ||
- rvm-exec 2.2 bash -c 'bundle exec rake circle:spec' | ||
- rvm-exec 2.1 bash -c 'bundle exec rake circle:spec' | ||
- rvm-exec 2.0 bash -c 'bundle exec rake circle:spec' | ||
- rvm-exec 1.9 bash -c 'bundle exec rake circle:spec' | ||
- rvm-exec 2.2 bash -c 'bundle exec appraisal rspec' | ||
- rvm-exec 2.1 bash -c 'bundle exec appraisal rspec' | ||
- rvm-exec 2.0 bash -c 'bundle exec appraisal rspec' | ||
- rvm-exec 1.9 bash -c 'bundle exec appraisal rspec' | ||
- rvm-exec 2.2 bash -c 'bundle exec rubocop' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rails", "3.2.21" | ||
gem "zeus", "0.13.3" | ||
|
||
gemspec :path => "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rails", "3.2.21" | ||
gem "zeus", "0.15.4" | ||
|
||
gemspec :path => "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rails", "4.2.3" | ||
gem "zeus", "0.13.3" | ||
|
||
gemspec :path => "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rails", "4.2.3" | ||
gem "zeus", "0.15.4" | ||
|
||
gemspec :path => "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module Zeus | ||
module ParallelTests | ||
VERSION = '0.2.5' | ||
VERSION = '0.3.0' | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
require 'bundler/setup' | ||
require 'zeus/parallel_tests' | ||
|
||
class CustomPlan < Zeus::ParallelTests::Rails | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'spec_helper' | ||
|
||
describe 'Unit A' do | ||
it 'should be true' do | ||
expect(true).to be true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'spec_helper' | ||
|
||
describe 'Unit B' do | ||
it 'should be true' do | ||
expect(true).to be true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
$LOAD_PATH.unshift File.expand_path('../../../lib', __FILE__) | ||
|
||
require 'zeus/parallel_tests/version' | ||
require 'open3' | ||
require 'English' | ||
|
||
describe 'zeus parallel spec' do | ||
def launch_server | ||
pid = fork do | ||
Dir.chdir 'spec/dummy/' do | ||
exec 'bundle exec zeus start > /dev/null' | ||
end | ||
end | ||
sleep 3 | ||
pid | ||
end | ||
|
||
before(:all) do | ||
# Copy current Appraisal gemfile to dummy app. | ||
gemfile = File.read(ENV['BUNDLE_GEMFILE']).gsub(':path => "../"', ':path => "../../"') | ||
File.open('spec/dummy/Gemfile', 'w+') { |f| f.write gemfile } | ||
gemfile_lock = File.read("#{ENV['BUNDLE_GEMFILE']}.lock").gsub('remote: ../', 'remote: ../../') | ||
File.open('spec/dummy/Gemfile.lock', 'w+') { |f| f.write gemfile_lock } | ||
|
||
# Launch Zeus. | ||
@server_pid = launch_server.to_s | ||
end | ||
|
||
it 'connects to server' do | ||
Dir.chdir 'spec/dummy/' do | ||
system('bundle', 'exec', 'zeus', 'r', 'true') | ||
expect($CHILD_STATUS.success?).to be true | ||
end | ||
end | ||
|
||
it 'runs rspec specs in two processes' do | ||
Dir.chdir 'spec/dummy' do | ||
Open3.popen2e('bundle', 'exec', 'zeus', 'parallel_rspec', '-n', '2', 'spec') do |_, output| | ||
expect(output.to_a.map(&:chomp)).to include('2 processes for 2 specs, ~ 1 specs per process') | ||
end | ||
end | ||
end | ||
|
||
it 'runs cucumbers in two processes' do | ||
Dir.chdir 'spec/dummy' do | ||
Open3.popen2e('bundle', 'exec', 'zeus', 'parallel_cucumber', '-n', '2', 'features') do |_, output| | ||
expect(output.to_a.map(&:chomp)).to include('2 processes for 2 features, ~ 1 features per process') | ||
end | ||
end | ||
end | ||
|
||
after(:all) do | ||
system('kill', '-9', @server_pid) | ||
system('rm', '-f', 'spec/dummy/Gemfile', 'spec/dummy/Gemfile.lock', 'spec/dummy/.zeus.sock') | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.