mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 21:43:49 +08:00
Fix linting on Travis for stable.
This commit is contained in:
parent
032f860c86
commit
90802053a0
16
.travis.yml
16
.travis.yml
|
@ -8,6 +8,7 @@ branches:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
- TRAVIS_NODE_VERSION="10"
|
||||||
- DISCOURSE_HOSTNAME=www.example.com
|
- DISCOURSE_HOSTNAME=www.example.com
|
||||||
- RUBY_GLOBAL_METHOD_CACHE_SIZE=131072
|
- RUBY_GLOBAL_METHOD_CACHE_SIZE=131072
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -46,6 +47,8 @@ cache:
|
||||||
- vendor/bundle
|
- vendor/bundle
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
- nvm install node
|
||||||
|
- node --version
|
||||||
- gem install bundler
|
- gem install bundler
|
||||||
- git clone --depth=1 https://github.com/discourse/discourse-backup-uploads-to-s3.git plugins/discourse-backup-uploads-to-s3
|
- git clone --depth=1 https://github.com/discourse/discourse-backup-uploads-to-s3.git plugins/discourse-backup-uploads-to-s3
|
||||||
- git clone --depth=1 https://github.com/discourse/discourse-spoiler-alert.git plugins/discourse-spoiler-alert
|
- git clone --depth=1 https://github.com/discourse/discourse-spoiler-alert.git plugins/discourse-spoiler-alert
|
||||||
|
@ -60,8 +63,7 @@ before_install:
|
||||||
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' == '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 [ '$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 > /dev/null; fi"
|
- bash -c "if [ '$QUNIT_RUN' == '1' ] || [ '$RUN_LINT' == '1' ]; then yarn install --dev > /dev/null; fi"
|
||||||
- bash -c "if [ '$QUNIT_RUN' == '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"
|
- bash -c "if [ '$RUN_LINT' != '1' ]; then bundle exec rake db:create db:migrate > /dev/null; fi"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
@ -69,11 +71,11 @@ script:
|
||||||
bash -c "
|
bash -c "
|
||||||
if [ '$RUN_LINT' == '1' ]; then
|
if [ '$RUN_LINT' == '1' ]; then
|
||||||
bundle exec rubocop --parallel && \
|
bundle exec rubocop --parallel && \
|
||||||
eslint --ext .es6 app/assets/javascripts && \
|
yarn eslint --ext .es6 app/assets/javascripts && \
|
||||||
eslint --ext .es6 test/javascripts && \
|
yarn eslint --ext .es6 test/javascripts && \
|
||||||
eslint --ext .es6 plugins/**/assets/javascripts && \
|
yarn eslint --ext .es6 plugins/**/assets/javascripts && \
|
||||||
eslint --ext .es6 plugins/**/test/javascripts && \
|
yarn eslint --ext .es6 plugins/**/test/javascripts && \
|
||||||
eslint app/assets/javascripts test/javascripts
|
yarn eslint app/assets/javascripts test/javascripts
|
||||||
else
|
else
|
||||||
if [ '$QUNIT_RUN' == '1' ]; then
|
if [ '$QUNIT_RUN' == '1' ]; then
|
||||||
bundle exec rake qunit:test['500000'] && \
|
bundle exec rake qunit:test['500000'] && \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user