Run travis tests using Chef-DK installation
This commit is contained in:
parent
89d0777c3f
commit
c457d3dee0
36
.travis.yml
36
.travis.yml
@ -1,12 +1,28 @@
|
|||||||
|
# Use Travis's cointainer based infrastructure
|
||||||
sudo: false
|
sudo: false
|
||||||
cache: bundler
|
addons:
|
||||||
language: ruby
|
apt:
|
||||||
bundler_args: --without kitchen_common kitchen_vagrant kitchen_cloud
|
sources:
|
||||||
rvm:
|
- chef-stable-precise
|
||||||
- 2.0
|
packages:
|
||||||
- 2.1
|
- chefdk
|
||||||
- 2.2
|
|
||||||
|
# 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:
|
script:
|
||||||
- bundle exec foodcritic -f any .
|
- /opt/chefdk/embedded/bin/chef --version
|
||||||
- bundle exec rubocop
|
- /opt/chefdk/embedded/bin/rubocop --version
|
||||||
- bundle exec rspec --color --format progress
|
- /opt/chefdk/embedded/bin/rubocop
|
||||||
|
- /opt/chefdk/embedded/bin/foodcritic --version
|
||||||
|
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec
|
||||||
|
- /opt/chefdk/embedded/bin/rspec spec
|
||||||
|
Loading…
x
Reference in New Issue
Block a user