general:
  build_dir: core

machine:
  services:
    - elasticsearch
database:
  override:
  - cp config/mongoid.yml.ci config/mongoid.yml
dependencies:
  cache_directories:
    - "~/factlink/js-library/node_modules"
    - "~/factlink/js-library/vendor"
    - "~/factlink/web-proxy/node_modules"
  post:
    - cd ~/factlink/js-library; bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --clean
    - cd ~/factlink/js-library; npm install
    - cd ~/factlink/web-proxy; npm install
test:
  override:
    - rspec spec-unit --profile
    - bundle exec rspec spec --profile
    - bundle exec rake konacha:load_poltergeist konacha:run
    - cd ~/factlink/js-library; grunt
    - cd ~/factlink/web-proxy; node_modules/expresso/bin/expresso -b
    - bundle exec rspec spec/acceptance spec/screenshots --profile
    - bundle exec brakeman --except SessionSettings -q -z
    - bundle exec scss-lint core/app/assets/stylesheets/ --config ../scss-config.scss-lint.yml
    - bundle exec scss-lint js-library/app/css/ --config scss-lint-config.scss-lint.yml 
    - bin/check_assets_updated.sh
    - bundle exec rails_best_practices --silent

general:
  build_dir: core

machine:
  services:
    - elasticsearch
database:
  override:
  - cp config/mongoid.yml.ci config/mongoid.yml
dependencies:
  cache_directories:
    - "~/factlink/js-library/node_modules"
    - "~/factlink/js-library/vendor"
    - "~/factlink/web-proxy/node_modules"
  post:
    - cd ~/factlink/js-library; bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --clean
    - cd ~/factlink/js-library; npm install
    - cd ~/factlink/web-proxy; npm install
test:
  override:
    - rspec spec-unit --profile
    - bundle exec rspec spec --profile
    - bundle exec rake konacha:load_poltergeist konacha:run
    - cd ~/factlink/js-library; grunt
    - cd ~/factlink/web-proxy; node_modules/expresso/bin/expresso -b
    - bundle exec rspec spec/acceptance spec/screenshots --profile
    - bundle exec brakeman --except SessionSettings -q -z
    - bundle exec scss-lint app/assets/stylesheets/ --config ../scss-lint-config.scss-lint.yml
    - bundle exec scss-lint ../js-library/app/css/ --config ../scss-lint-config.scss-lint.yml
    - bin/check_assets_updated.sh
    - bundle exec rails_best_practices --silent

Fix scss lint for core and js lib
Fix scss lint for core and js lib
