language: ruby
cache: bundler
notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/048b9bd9c30d5618d0a5
    on_success: change # options: [always|never|change] default: always
    on_failure: always # options: [always|never|change] default: always
    on_start: false # default: false
rvm:
  - 2.3.1

bundler_args: --without integration development
before_script:
  - bundle exec berks
script:
  - bundle exec foodcritic -f any . --tags ~FC007 --tags ~FC015 --tags ~FC023
  - bundle exec rubocop
  - bundle exec rspec spec/

# Use Travis's cointainer based infrastructure
sudo: false

notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/048b9bd9c30d5618d0a5
    on_success: change # options: [always|never|change] default: always
    on_failure: always # options: [always|never|change] default: always
    on_start: false # default: false
addons:
  apt:
    sources:
      - chef-current-precise
    packages:
      - chefdk

# Don't `bundle install`
install: echo "skip bundle install"

branches:
  only:
    - master

# Ensure we make ChefDK's Ruby the default
before_script:
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
  # We have to install chef-sugar for ChefSpec
  - /opt/chefdk/embedded/bin/chef gem install chef-sugar

script:
  - /opt/chefdk/embedded/bin/chef --version
  - /opt/chefdk/embedded/bin/cookstyle --version
  - /opt/chefdk/embedded/bin/foodcritic --version
  - /opt/chefdk/bin/chef exec rake
Test in ChefDK and avoid double testing
Test in ChefDK and avoid double testing

Avoid testing branches and PRs on a single commit

Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
