Skip to content

Commit

Permalink
modulesync: drop Puppet 3 support, use parallel_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
domcleal committed Apr 6, 2017
1 parent 8591e64 commit 3cab54c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 deletions.
20 changes: 6 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,17 @@ rvm:
- 2.1.5
env:
# First test the major distros
- PUPPET_VERSION=4.0 ONLY_OS=centos-6-x86_64,centos-7-x86_64,debian-7-x86_64,debian-8-x86_64,ubuntu-14-x86_64,ubuntu-14.04-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64
- PUPPET_VERSION=3.5 ONLY_OS=debian-8-x86_64 FUTURE_PARSER=yes TRUSTED_NODE_DATA=yes
- PUPPET_VERSION=3.5 ONLY_OS=debian-8-x86_64
- PUPPET_VERSION=4.6 ONLY_OS=centos-6-x86_64,centos-7-x86_64,debian-7-x86_64,debian-8-x86_64,ubuntu-14-x86_64,ubuntu-14.04-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64
# Test the rest of the supported platforms
- PUPPET_VERSION=4.0 EXCLUDE_OS=centos-6-x86_64,centos-7-x86_64,debian-7-x86_64,debian-8-x86_64,ubuntu-14-x86_64,ubuntu-14.04-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64,scientific-6-x86_64,scientific-7-x86_64
- PUPPET_VERSION=4.6 EXCLUDE_OS=centos-6-x86_64,centos-7-x86_64,debian-7-x86_64,debian-8-x86_64,ubuntu-14-x86_64,ubuntu-14.04-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64,scientific-6-x86_64,scientific-7-x86_64
matrix:
fast_finish: true
include:
# Only Ubuntu 14.04 uses Ruby 1.9.3 to run Puppet 3.x
- rvm: 1.9.3
env: PUPPET_VERSION=3.5 ONLY_OS="ubuntu-14-x86_64,ubuntu-14.04-x86_64"
# Only EL7 uses Ruby 2.0.0 to run Puppet 3.x
- rvm: 2.0.0
env: PUPPET_VERSION=3.5 ONLY_OS="centos-7-x86_64,redhat-7-x86_64"
# Only Puppet 4.x supports Ruby 2.2. Also limit the OS set we test Ruby 2.2 with.
# Limit the OS set we test Ruby 2.2 with.
- rvm: 2.2.6
env: PUPPET_VERSION=4.0 ONLY_OS="debian-8-x86_64,centos-7-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64,freebsd-10-amd64,windows-2012 R2-x64"
# Only Puppet >= 4.4 supports Ruby 2.3. Also limit the OS set we test Ruby 2.3 with.
env: PUPPET_VERSION=4.6 ONLY_OS="debian-8-x86_64,centos-7-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64,freebsd-10-amd64,windows-2012 R2-x64"
# Limit the OS set we test Ruby 2.3 with.
- rvm: 2.3.0
env: PUPPET_VERSION=4.4 ONLY_OS="debian-8-x86_64,centos-7-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64,freebsd-10-amd64,windows-2012 R2-x64"
env: PUPPET_VERSION=4.6 ONLY_OS="debian-8-x86_64,centos-7-x86_64,ubuntu-16-x86_64,ubuntu-16.04-x86_64,freebsd-10-amd64,windows-2012 R2-x64"
bundler_args: --without system_tests development
sudo: false
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

source 'https://rubygems.org'

gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 3.5'
gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 4.6'

gem 'rake'
gem 'rspec', '~> 3.0'
gem 'rspec-puppet', '~> 2.3'
gem 'rspec-puppet-facts', '>= 1.7'
gem 'puppetlabs_spec_helper', '= 2.1.0'
gem 'puppetlabs_spec_helper', '>= 2.1.1'
gem 'puppet-lint', '>= 2'
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-empty_string-check'
Expand Down
20 changes: 7 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

# blacksmith is broken with ruby 1.8.7
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.8.7')
# blacksmith isn't always present, e.g. on Travis with --without development
begin
require 'puppet_blacksmith/rake_tasks'
Blacksmith::RakeTask.new do |t|
t.tag_pattern = "%s"
end
rescue LoadError
# blacksmith isn't always present, e.g. on Travis with --without development
begin
require 'puppet_blacksmith/rake_tasks'
Blacksmith::RakeTask.new do |t|
t.tag_pattern = "%s"
end
rescue LoadError
end

PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*.pp"]
PuppetLint.configuration.log_format = '%{path}:%{line}:%{KIND}: %{message}'

# Used for type alias tests
PuppetSyntax.exclude_paths << 'spec/static_fixtures/test_module/**/*.pp' if Puppet.version.to_f < 4.0

require 'puppet-lint-param-docs/tasks'
PuppetLintParamDocs.define_selective do |config|
config.pattern = []
Expand All @@ -32,4 +26,4 @@ KafoModuleLint::RakeTask.new do |config|
config.pattern = []
end

task :default => [:validate, :lint, :spec]
task :default => [:release_checks]
1 change: 0 additions & 1 deletion spec/spec.opts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
--format
documentation
--colour
--loadby
mtime
--backtrace

0 comments on commit 3cab54c

Please sign in to comment.