From: Dan Carley Date: Sun, 16 Jun 2013 19:54:02 +0000 (+0100) Subject: [#213] Run puppet-lint as part of CI X-Git-Tag: list~6^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=52f4f844233bf232b458f194784950fbaf56e04c;p=puppet-modules%2Fpuppetlabs-firewall.git [#213] Run puppet-lint as part of CI Will prevent lint from being violated again in the future. --- diff --git a/.travis.yml b/.travis.yml index 8f713e0..0f05b19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: ruby bundler_args: --without development -script: "bundle exec rake spec SPEC_OPTS='--format documentation'" +script: "bundle exec rake ci SPEC_OPTS='--format documentation'" rvm: - 1.8.7 - 1.9.3 diff --git a/Gemfile b/Gemfile index 130bd14..4ed08e8 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,7 @@ source 'https://rubygems.org' group :development, :test do gem 'puppetlabs_spec_helper', :require => false gem 'rspec-system-puppet', '~>2.0' + gem 'puppet-lint' end if puppetversion = ENV['PUPPET_GEM_VERSION'] diff --git a/Rakefile b/Rakefile index 4847ddd..261e9d0 100644 --- a/Rakefile +++ b/Rakefile @@ -7,6 +7,15 @@ require 'rspec/core/rake_task' require 'puppetlabs_spec_helper/rake_tasks' require 'rspec-system/rake_task' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.ignore_paths = ['vendor/**/*.pp'] + task :default do sh %{rake -T} end + +desc 'Run reasonably quick tests for CI' +task :ci => [ + :lint, + :spec, +]