55 - DISCOURSE_HOSTNAME=www.example.com
66 - RUBY_GC_MALLOC_LIMIT=50000000
77 matrix :
8- - " RAILS_MASTER=0 QUNIT_RUN=0"
9- - " RAILS_MASTER=1 QUNIT_RUN=0"
10- - " RAILS_MASTER=0 QUNIT_RUN=1"
11- - " RAILS_MASTER=1 QUNIT_RUN=1"
8+ - " RAILS_MASTER=0 QUNIT_RUN=0 RUN_LINT=0"
9+ - " RAILS_MASTER=0 QUNIT_RUN=1 RUN_LINT=0"
10+ - " RAILS_MASTER=0 QUNIT_RUN=0 RUN_LINT=1"
1211
1312addons :
1413 postgresql : 9.5
@@ -20,14 +19,11 @@ addons:
2019 - jhead
2120
2221matrix :
23- allow_failures :
24- - env : " RAILS_MASTER=1 QUNIT_RUN=0"
25- - env : " RAILS_MASTER=1 QUNIT_RUN=1"
2622 fast_finish : true
2723
2824rvm :
29- - 2.4.1
30- - 2.3.3
25+ - 2.4.2
26+ - 2.3.4
3127
3228services :
3329 - redis-server
@@ -46,20 +42,32 @@ before_install:
4642 - git clone --depth=1 https://github.com/discourse/discourse-spoiler-alert.git plugins/discourse-spoiler-alert
4743 - git clone --depth=1 https://github.com/discourse/discourse-cakeday.git plugins/discourse-cakeday
4844 - git clone --depth=1 https://github.com/discourse/discourse-canned-replies.git plugins/discourse-canned-replies
49- - git clone --depth=1 https://github.com/discourse/discourse-slack-official.git plugins/discourse-slack-official
50- - yarn global add eslint@3 babel-eslint
51- - eslint app/assets/javascripts
52- - eslint --ext .es6 app/assets/javascripts
53- - eslint --ext .es6 test/javascripts
54- - eslint --ext .es6 plugins/**/assets/javascripts
55- - eslint test/javascripts
56-
57- before_script :
58- - bundle exec rake db:create db:migrate
45+ - git clone --depth=1 https://github.com/discourse/discourse-chat-integration.git plugins/discourse-chat-integration
46+ - git clone --depth=1 https://github.com/discourse/discourse-assign.git plugins/discourse-assign
47+ - export PATH=$HOME/.yarn/bin:$PATH
5948
6049install :
6150 - bash -c "if [ '$RAILS_MASTER' == '1' ]; then bundle update --retry=3 --jobs=3 arel rails seed-fu; fi"
6251 - bash -c "if [ '$RAILS_MASTER' == '0' ]; then bundle install --without development --deployment --retry=3 --jobs=3; fi"
52+ - bash -c "if [ '$RUN_LINT' == '1' ]; then yarn global add eslint babel-eslint; fi"
6353
6454script :
65- - bash -c "if [ '$QUNIT_RUN' == '0' ]; then bundle exec rspec && bundle exec rake plugin:spec; else bundle exec rake qunit:test['200000']; fi"
55+ - |
56+ bash -c "
57+ if [ '$RUN_LINT' == '1' ]; then
58+ bundle exec rubocop --parallel && \
59+ eslint --ext .es6 app/assets/javascripts && \
60+ eslint --ext .es6 test/javascripts && \
61+ eslint --ext .es6 plugins/**/assets/javascripts && \
62+ eslint --ext .es6 plugins/**/test/javascripts && \
63+ eslint app/assets/javascripts test/javascripts
64+ else
65+ bundle exec rake db:create db:migrate
66+
67+ if [ '$QUNIT_RUN' == '1' ]; then
68+ LOAD_PLUGINS=1 bundle exec rake qunit:test['400000']
69+ else
70+ bundle exec rspec && bundle exec rake plugin:spec
71+ fi
72+ fi
73+ "
0 commit comments