diff options
author | Louis-Philippe VĂ©ronneau <pollito@riseup.net> | 2018-02-02 13:45:12 -0500 |
---|---|---|
committer | Louis-Philippe VĂ©ronneau <pollito@riseup.net> | 2018-02-02 13:45:12 -0500 |
commit | 48132d55bba99a4356d91ad13d8639755d9f9401 (patch) | |
tree | 1b179269c88e950a0bd95fa3c8f6c1dfb2bab3f0 /Rakefile | |
parent | 90cb24c6e0916b27eae744e5f6ecaa84a180517c (diff) |
replace the CI tests by the ones used in the backupninja module/
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 25 |
1 files changed, 8 insertions, 17 deletions
@@ -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 |