diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-13 11:04:33 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-13 11:47:28 +0100 |
commit | 3975b68a162775c471a48afab0b624d0142601dc (patch) | |
tree | 6b27728f51d23ea85f087416ecb8bdad86ff0c27 | |
parent | 065de4ab791373f7e6b8b5d3b73b5fe7c9e8e7c5 (diff) | |
download | gitlab-ce-parallel-tests.tar.gz |
First try at faster testsparallel-tests
-rw-r--r-- | .gitlab-ci.yml | 14 | ||||
-rw-r--r-- | .rspec | 3 | ||||
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | config/database.yml.mysql | 2 |
5 files changed, 16 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd013d50faa..1edd971b6cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ before_script: - touch log/application.log - touch log/test.log - retry bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}" - - RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate + - RAILS_ENV=test bundle exec rake parallel:setup stages: - test @@ -34,7 +34,7 @@ spec:feature: stage: test script: - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature + - RAILS_ENV=test SIMPLECOV=true bundle exec rake parallel:spec spec:feature tags: - ruby - mysql @@ -42,7 +42,7 @@ spec:feature: spec:api: stage: test script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api + - RAILS_ENV=test SIMPLECOV=true bundle exec rake parallel:spec spec:api tags: - ruby - mysql @@ -50,7 +50,7 @@ spec:api: spec:models: stage: test script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models + - RAILS_ENV=test SIMPLECOV=true bundle exec rake parallel:spec spec:models tags: - ruby - mysql @@ -83,7 +83,7 @@ spinach:project:half: stage: test script: - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half + - RAILS_ENV=test SIMPLECOV=true bundle exec rake parallel:features-spinach spinach:project:half tags: - ruby - mysql @@ -92,7 +92,7 @@ spinach:project:rest: stage: test script: - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest + - RAILS_ENV=test SIMPLECOV=true bundle exec rake parallel:features-spinach spinach:project:rest tags: - ruby - mysql @@ -101,7 +101,7 @@ spinach:other: stage: test script: - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other + - RAILS_ENV=test SIMPLECOV=true bundle exec rake parallel:features-spinach spinach:other tags: - ruby - mysql @@ -1,2 +1,3 @@ --color ---format Fuubar +--format progress +--format ParallelTests::RSpec::FailuresLogger --out tmp/failing_specs.log @@ -293,6 +293,8 @@ group :development, :test do gem 'bundler-audit', require: false gem 'benchmark-ips', require: false + + gem "parallel_tests" end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index d4e28db00d6..c5e3df112ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -547,6 +547,9 @@ GEM org-ruby (0.9.12) rubypants (~> 0.2) orm_adapter (0.5.0) + parallel (1.6.2) + parallel_tests (2.4.1) + parallel paranoia (2.1.4) activerecord (~> 4.0) parser (2.2.3.0) @@ -980,6 +983,7 @@ DEPENDENCIES omniauth-twitter (~> 1.2.0) omniauth_crowd (~> 2.2.0) org-ruby (~> 0.9.12) + parallel_tests paranoia (~> 2.0) pg (~> 0.18.2) poltergeist (~> 1.9.0) diff --git a/config/database.yml.mysql b/config/database.yml.mysql index a99c50706c5..f18f04e5664 100644 --- a/config/database.yml.mysql +++ b/config/database.yml.mysql @@ -35,7 +35,7 @@ test: &test encoding: utf8 collation: utf8_general_ci reconnect: false - database: gitlabhq_test + database: gitlabhq_test<%= ENV['TEST_ENV_NUMBER'] %> pool: 5 username: root password: |