forked from elijah/chef-prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating Rakefile for travis and adding travis config
- Loading branch information
Ray Rodriguez
committed
Mar 8, 2015
1 parent
a1af98a
commit b8cb23b
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
rvm: | ||
- 2.1 | ||
- 2.2 | ||
|
||
bundler_args: --without development integration kitchen_docker kitchen_vagrant kitchen_cloud kitchen_common | ||
|
||
env: | ||
- USE_SYSTEM_GECODE=1 | ||
|
||
before_install: | ||
- sudo apt-get -y -qq install libgecode-dev | ||
|
||
script: | ||
- bundle exec rake travis:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require 'bundler/setup' | ||
require 'rubocop/rake_task' | ||
require 'foodcritic' | ||
require 'kitchen' | ||
require 'rspec/core/rake_task' | ||
|
||
# Unit Tests. rspec/chefspec | ||
RSpec::Core::RakeTask.new(:unit) | ||
|
||
# Style tests. Rubocop and Foodcritic | ||
namespace :style do | ||
desc 'Run Ruby style checks' | ||
RuboCop::RakeTask.new(:ruby) | ||
|
||
desc 'Run Chef style checks' | ||
FoodCritic::Rake::LintTask.new(:chef) do |t| | ||
t.options = { | ||
fail_tags: ['any'] | ||
} | ||
end | ||
end | ||
|
||
desc 'Run all style checks' | ||
task style: ['style:chef', 'style:ruby'] | ||
|
||
# Integration tests. Kitchen.ci | ||
namespace :integration do | ||
desc 'Run Test Kitchen with Vagrant' | ||
task :vagrant do | ||
Kitchen.logger = Kitchen.default_file_logger | ||
Kitchen::Config.new.instances.each do |instance| | ||
instance.test(:always) | ||
end | ||
end | ||
end | ||
|
||
# We cannot run Test Kitchen on Travis CI yet... | ||
namespace :travis do | ||
desc 'Run tests on Travis' | ||
task ci: %w(style unit) | ||
end | ||
|
||
# The default rake task should just run it all | ||
task default: ['travis:ci', 'integration'] |