Commit b53bb07f authored by Blerim Sheqa's avatar Blerim Sheqa

Merge branch 'parallel_tests'

parents eef6a068 c8b5eb07
......@@ -17,27 +17,27 @@ matrix:
fast_finish: true
include:
- rvm: 2.4.0
env: PUPPET_VERSION="~> 4.0" CHECK=spec
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.3
env: PUPPET_VERSION="~> 4.0" CHECK=spec
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.6
env: PUPPET_VERSION="~> 4.0" CHECK=spec
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.1.9
env: PUPPET_VERSION="~> 4.0" CHECK=spec
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.1.9
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=spec
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
- rvm: 2.1.9
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" CHECK=spec
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" CHECK=spec
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=spec
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.6.0" CHECK=spec
- rvm: 2.1.9
env: PUPPET_VERSION="~> 3.6.0" CHECK=spec
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
allow_failures:
- rvm: 2.4.0
branches:
only:
- master
- /^v\d/
notifications:
email: false
#deploy:
......
......@@ -9,3 +9,6 @@ gem 'facterdb', :git => 'https://github.com/jfryman/facterdb', :ref => 'sles-12-
gem 'rspec-puppet-facts', '>= 1.6.0'
gem 'json', jsonversion
gem 'json_pure', jsonversion
gem 'metadata-json-lint'
gem 'parallel_tests', RUBY_VERSION < '2.0.0' ? '~> 2.9.0' : '>= 2.10.0'
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_selector_inside_resource')
PuppetLint.configuration.send('disable_only_variable_string')
PuppetLint.configuration.ignore_paths = [
"spec/**/*.pp",
"serverspec/**/*.pp",
"pkg/**/*.pp",
"examples/**/*.pp",
"vendor/**/*.pp"
]
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
exclude_paths = %w(
spec/**/*
serverspec/**/*
pkg/**/*
examples/**/*
vendor/**/*
.vendor/**/*
)
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths
desc 'Run validate, parallel_spec, lint'
task test: %w(metadata_lint validate parallel_spec lint)
......@@ -34,7 +34,7 @@ For unit testing we use [RSpec]. All classes, defined resource types and functio
Run unit tests:
```
cd puppet-icinga2-rewrite
rake spec
rake parallel_spec
```
## Integration tests
......
......@@ -3,7 +3,7 @@
"version": "0.7.2",
"author": "Icinga Development Team",
"summary": "Icinga 2 Puppet Module",
"license": "Apache 2.0",
"license": "Apache-2.0",
"source": "git://github.com/icinga/puppet-icinga2",
"project_page": "https://github.com/icinga/puppet-icinga2",
"issues_url": "https://github.com/icinga/puppet-icinga2/issues",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment