From 48132d55bba99a4356d91ad13d8639755d9f9401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 2 Feb 2018 13:45:12 -0500 Subject: replace the CI tests by the ones used in the backupninja module/ --- Rakefile | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 85326bb..401002e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,19 +1,10 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] +task :tests do + require 'puppetlabs_spec_helper/rake_tasks' -desc "Validate manifests, templates, and ruby files" -task :validate do - Dir['manifests/**/*.pp'].each do |manifest| - sh "puppet parser validate --noop #{manifest}" - end - Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| - sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ - end - Dir['templates/**/*.erb'].each do |template| - sh "erb -P -x -T '-' #{template} | ruby -c" - end -end + # run syntax checks on manifests, templates and hiera data + # also runs :metadata_lint + Rake::Task[:validate].invoke -task :test => [:lint, :syntax , :validate, :spec] + # runs puppet-lint + Rake::Task[:lint].invoke +end -- cgit v1.2.3