Skip to content

Commit

Permalink
Do not precompile assets if test worker won't run feature tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Apr 7, 2019
1 parent 428142a commit bf2fa48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -70,12 +70,13 @@ before_script:
- export SPEC_COUNT=$(echo $SPEC_FILES | wc -w)
- export BEGIN_INDEX=$[($SPEC_COUNT + $TEST_WORKERS - 1) / $TEST_WORKERS * $TEST_WORKER + 1]
- export END_INDEX=$[($SPEC_COUNT + $TEST_WORKERS - 1) / $TEST_WORKERS * ($TEST_WORKER + 1)]
- export SPECS_TO_RUN=$(echo $SPEC_FILES | cut -d " " -f $BEGIN_INDEX-$END_INDEX)
script:
- echo ===[TEST_WORKER=$TEST_WORKER script $(date -u +%Y%m%d-%H%M%S)]===
- bundle exec rake assets:precompile
- echo $SPECS_TO_RUN | grep -q "spec/features/" && bundle exec rake assets:precompile
# - bundle exec parallel_test spec/ -n 6 --only-group $TEST_GROUP --group-by filesize --type rspec
- echo ===[TEST_WORKER=$TEST_WORKER rspec $(date -u +%Y%m%d-%H%M%S)]===
- bundle exec rspec $(echo $SPEC_FILES | cut -d " " -f $BEGIN_INDEX-$END_INDEX)
- bundle exec rspec $SPECS_TO_RUN
after_script:
- echo ===[TEST_WORKER=$TEST_WORKER after_script $(date -u +%Y%m%d-%H%M%S)]===
notifications:
Expand Down

0 comments on commit bf2fa48

Please sign in to comment.