From c457d3dee0d753e5a05e6926c57f762af4ac44d2 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 7 Oct 2015 10:43:30 -0700 Subject: [PATCH] Run travis tests using Chef-DK installation --- .travis.yml | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6769114..29a61ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,28 @@ +# Use Travis's cointainer based infrastructure sudo: false -cache: bundler -language: ruby -bundler_args: --without kitchen_common kitchen_vagrant kitchen_cloud -rvm: - - 2.0 - - 2.1 - - 2.2 +addons: + apt: + sources: + - chef-stable-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: - - bundle exec foodcritic -f any . - - bundle exec rubocop - - bundle exec rspec --color --format progress + - /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