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
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user