summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-21 20:17:15 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 17:08:17 +0200
commit0a1fccb2ed0e0479dbaa4c22726d5c7a440f014c (patch)
tree67687617f475fa9253aa84b6a325bb953e5db852 /.gitlab-ci.yml
parentca3c5c295ed653b483fe81c3918ffe60f46666b9 (diff)
downloadgitlab-ce-0a1fccb2ed0e0479dbaa4c22726d5c7a440f014c.tar.gz
Try to use knapsack
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml87
1 files changed, 42 insertions, 45 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 85730e1b687..a819610c41e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,58 +25,55 @@ before_script:
- retry bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
- RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
-stages:
-- test
-- notifications
-
-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
-
-spec:api:
- stage: test
- script:
- - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api
-
-spec:models:
- stage: test
- script:
- - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
-
-spec:lib:
+.rspec_tests: &rspec_tests
stage: test
+ variables:
+ RAILS_ENV: "test"
+ SIMPLECOV: "true"
script:
- - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib
+ - JOB_NAME=( $CI_BUILD_NAME )
+ - export CI_NODE_INDEX=${JOB_NAME[1]}
+ - export CI_NODE_TOTAL=${JOB_NAME[2]}
+ - bundle exec rake assets:precompile 2>/dev/null
+ - bundle exec rake knapsack:rspec
-spec:services:
+.spinach_tests: &spinach_tests
stage: test
+ variables:
+ RAILS_ENV: "test"
+ SIMPLECOV: "true"
script:
- - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services
+ - JOB_NAME=( $CI_BUILD_NAME )
+ - export CI_NODE_INDEX=${JOB_NAME[1]}
+ - export CI_NODE_TOTAL=${JOB_NAME[2]}
+ - bundle exec rake assets:precompile 2>/dev/null
+ - bundle exec rake knapsack:cucumber
-spec:other:
- stage: test
- script:
- - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other
-
-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
-
-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
+stages:
+- test
+- notifications
-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
+spec 0 10: *rspec_tests
+spec 1 10: *rspec_tests
+spec 2 10: *rspec_tests
+spec 3 10: *rspec_tests
+spec 4 10: *rspec_tests
+spec 5 10: *rspec_tests
+spec 6 10: *rspec_tests
+spec 7 10: *rspec_tests
+spec 8 10: *rspec_tests
+spec 9 10: *rspec_tests
+
+spinach 0 10: *spinach_tests
+spinach 1 10: *spinach_tests
+spinach 2 10: *spinach_tests
+spinach 3 10: *spinach_tests
+spinach 4 10: *spinach_tests
+spinach 5 10: *spinach_tests
+spinach 6 10: *spinach_tests
+spinach 7 10: *spinach_tests
+spinach 8 10: *spinach_tests
+spinach 9 10: *spinach_tests
teaspoon:
stage: test