.travis.yml
# Use Travis's cointainer based infrastructure
language: ruby
rvm:
- 2.1.0
sudo: false
addons:
apt:
sources:
- chef-current-precise
packages:
- chefdk
env:
- CI=true
before_deploy:
- gem install bundler
install:
- chef exec bundle install --without=development --without=chef
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/rubocop --version
- /opt/chefdk/embedded/bin/rubocop
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec
- /opt/chefdk/embedded/bin/rspec spec
- rake quality:all