From 33c72efde10692e1d3d6aaaead9e6ed9364ffdac Mon Sep 17 00:00:00 2001 From: Nan Liu Date: Fri, 16 Mar 2012 23:11:55 -0500 Subject: [PATCH] Add travis.ci for testing multiple puppet versions. The existing spec tests should be tested on multiple puppet version. The addition of travis.ci allows us to easily verify all specs are passing and new manifests did not break backwards compatibility by introducing new syntax. --- .travis.yml | 22 ++++++++++++++++++++++ Gemfile | 13 +++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .travis.yml create mode 100644 Gemfile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9fd849d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.2 + - ree +before_script: + - "[ '2.6.12' = $PUPPET_VERSION ] && git clone git://github.com/puppetlabs/puppetlabs-create_resources.git spec/fixtures/modules/create_resources" +after_script: +script: "rake spec" +branches: + only: + - tb/travis +env: + - PUPPET_VERSION=2.6.12 + - PUPPET_VERSION=2.7.6 + - PUPPET_VERSION=2.7.9 +matrix: + exclude: + - rvm: 1.9.2 + env: PUPPET_VERSION=2.6.12 +notifications: + email: false diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..c538af3 --- /dev/null +++ b/Gemfile @@ -0,0 +1,13 @@ +source :rubygems + +puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] + +gem 'puppet', puppetversion +gem 'hiera', '>= 0.3.0' +gem 'hiera-puppet', '>= 0.3.0' + +group :test do + gem 'rake', '>= 0.9.0' + gem 'rspec', '>= 2.8.0' + gem 'rspec-puppet', '>= 0.1.1' +end