(maint) Test against specific, supported versions of Puppet

This commit is contained in:
Garrett Honeycutt 2016-10-24 22:41:13 -04:00
parent 6e3c973868
commit 516b1594ba
2 changed files with 38 additions and 10 deletions

View File

@ -1,18 +1,45 @@
---
language: ruby
sudo: false
bundler_args: --without development acceptance
script:
- "bundle exec rake $CHECK"
notifications:
email: false
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.3.1
env:
- "CHECK=spec SPEC_OPTS='--color --format documentation'"
- "CHECK=rubocop"
matrix:
- PUPPET_GEM_VERSION="~> 3.7.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 3.8.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 3" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.0.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.1.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.2.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.3.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.4.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.5.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.6.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4.7.0" CHECK=spec
- PUPPET_GEM_VERSION="~> 4" CHECK=spec
- PUPPET_GEM_VERSION="~> 4" CHECK=rubocop
script: 'SPEC_OPTS="--format documentation" bundle exec rake $CHECK'
matrix:
fast_finish: true
exclude:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 4" CHECK=rubocop
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.7.0" CHECK=spec
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.8.0" CHECK=spec
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3" CHECK=spec

13
Gemfile
View File

@ -6,12 +6,10 @@ gem 'rgen'
gem 'redcarpet'
gem 'yard', '~> 0.9.5'
puppetversion = ENV['PUPPET_VERSION']
if puppetversion
gem 'puppet', puppetversion
if ENV['PUPPET_GEM_VERSION']
gem 'puppet', ENV['PUPPET_GEM_VERSION'], :require => false
else
gem 'puppet'
gem 'puppet', :require => false
end
group :test do
@ -19,7 +17,6 @@ group :test do
gem 'mocha'
gem 'puppetlabs_spec_helper'
gem 'serverspec'
gem 'rubocop', '~> 0.41.0'
end
group :acceptance do
@ -36,3 +33,7 @@ group :development do
gem 'pry-byebug'
end
end
gem 'json', '<= 1.8' if RUBY_VERSION < '2.0.0'
gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0'
gem 'rubocop' if RUBY_VERSION >= '2.0.0'