Skip to content
Browse files

Attempting to separate tests into smaller chunks via Travis's matrix …

…feature
  • Loading branch information...
1 parent 154d2c6 commit 621dc0bf5d6e0a89812b056ddb32706623a6f07f Cameron Dutro committed
Showing with 9 additions and 1 deletion.
  1. +8 −1 .travis.yml
  2. +1 −0 spec/normalization/base_spec.rb
View
9 .travis.yml
@@ -6,5 +6,12 @@ rvm:
matrix:
allow_failures:
- rvm: jruby-head
-script: 'bundle exec rake spec:full'
+env:
+ - "FULL_SPEC=true TEST_FOLDERS=spec/bidi"
+ - "FULL_SPEC=true TEST_FOLDERS=spec/collation"
+ - "FULL_SPEC=true TEST_FOLDERS=spec/normalization_spec.rb spec/normalization"
+ - "FULL_SPEC=true TEST_FOLDERS=spec/formatters spec/localized spec/resources"
+ - "FULL_SPEC=true TEST_FOLDERS=spec/shared spec/tokenizers spec/utils_spec.rb spec/utils"
+ - "FULL_SPEC=true TEST_FOLDERS=spec/core_ext_spec.rb spec/readme_spec.rb spec/twitter_cldr_spec.rb"
+script: 'bundle exec rspec $TEST_FOLDERS'
before_script: 'gem install bundler'
View
1 spec/normalization/base_spec.rb
@@ -4,6 +4,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
require 'spec_helper'
+include TwitterCldr::Normalization
describe Base do
describe "#combining_class_for" do

2 comments on commit 621dc0b

@KL-7

That way you'll have to add manually at least each new spec directory. How about running all fast specs in one batch and then separately each file that includes slow specs?

E.g. (just an example, not sure that it'll work exactly like that):

env:
  - "RSPEC_COMMAND=--tag ~slow spec"
  - "RSPEC_COMMAND=--tag slow spec/bidi/bidi_spec.rb"
  - "RSPEC_COMMAND=--tag slow spec/collation/collation_spec.rb"
  - "RSPEC_COMMAND=--tag slow spec/collation/tailoring_spec.rb"
  - "RSPEC_COMMAND=--tag slow spec/collation/trie_dumps_spec.rb"
  - "RSPEC_COMMAND=--tag slow spec/normalization/normalization_spec.rb"
script: 'bundle exec rspec $RSPEC_COMMAND'
before_script: 'gem install bundler'

I believe these are all files that include slow specs. Probably there's some way to generalize it, but I can think of one at the moment.

@KL-7

Of course, if some of the 'slow' specs are fast enough to run one after another, they can be combined.

Please sign in to comment.
Something went wrong with that request. Please try again.