Use `yarn exec` on Travis to ensure we use the right version.

This commit is contained in:
Guo Xiang Tan 2018-08-28 15:13:35 +08:00
parent 740308675b
commit 83bf641292
1 changed files with 6 additions and 7 deletions

View File

@ -67,8 +67,7 @@ before_install:
install:
- bash -c "if [ '$RAILS_MASTER' == '1' ]; then bundle update --retry=3 --jobs=3 arel rails seed-fu > /dev/null; fi"
- bash -c "if [ '$RAILS_MASTER' == '0' ]; then bundle install --without development --deployment --retry=3 --jobs=3 > /dev/null; fi"
- bash -c "if [ '$RUN_LINT' == '1' ]; then yarn global add eslint babel-eslint prettier > /dev/null; fi"
- bash -c "if [ '$QUNIT_RUN' == '1' ]; then yarn install --dev > /dev/null; fi"
- bash -c "if [ '$QUNIT_RUN' == '1' ] || [ '$RUN_LINT' == '1' ]; then yarn install --dev > /dev/null; fi"
- bash -c "if [ '$RUN_LINT' != '1' ]; then bundle exec rake db:create db:migrate > /dev/null; fi"
script:
@ -77,11 +76,11 @@ script:
if [ '$RUN_LINT' == '1' ]; then
bundle exec rubocop --parallel && \
bundle exec danger && \
eslint --ext .es6 app/assets/javascripts && \
eslint --ext .es6 test/javascripts && \
eslint --ext .es6 plugins/**/assets/javascripts && \
eslint --ext .es6 plugins/**/test/javascripts && \
eslint app/assets/javascripts test/javascripts
yarn exec eslint --ext .es6 app/assets/javascripts && \
yarn exec eslint --ext .es6 test/javascripts && \
yarn exec eslint --ext .es6 plugins/**/assets/javascripts && \
yarn exec eslint --ext .es6 plugins/**/test/javascripts && \
yarn exec eslint app/assets/javascripts test/javascripts
else
if [ '$QUNIT_RUN' == '1' ]; then
bundle exec rake qunit:test['500000'] && \