Add everything needed by travis-ci

This commit adds all of the config files
needed for travisci
This commit is contained in:
Dan Bode 2012-02-27 16:44:45 -08:00
parent 8d4d5ea6b8
commit 2dbcf740df
6 changed files with 49 additions and 6 deletions

22
.travis.yml Normal file

@ -0,0 +1,22 @@
language: ruby
rvm:
- 1.8.7
- 1.9.2
before_script:
- 'git clone git://github.com/saz/puppet-ssh spec/fixtures/modules/ssh'
- 'git clone git://github.com/puppetlabs/puppetlabs-rsync spec/fixtures/modules/rsync'
- 'git clone git://github.com/saz/puppet-memcached spec/fixtures/modules/memcached'
- 'git clone git://github.com/puppetlabs/puppetlabs-stdlib spec/fixtures/modules/stdlib'
- 'git clone git://github.com/puppetlabs/puppet-apt spec/fixtures/modules/apt'
script: "rake spec"
branches:
only:
- master
env:
- PUPPET_VERSION=2.6.12
- PUPPET_VERSION=2.7.6
- PUPPET_VERSION=2.7.11
matrix:
exclude:
- rvm: 1.9.2
env: PUPPET_VERSION=2.6.12

11
Gemfile Normal file

@ -0,0 +1,11 @@
source :rubygems
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
gem 'puppet', puppetversion
group :test do
gem 'rake', '>= 0.9.0'
gem 'rspec', '>= 2.8.0'
gem 'rspec-puppet', '>= 0.1.1'
end

@ -1,14 +1,21 @@
require 'rubygems'
require 'rake'
require 'rspec/core/rake_task'
task :default => [:spec]
task :default do
system("rake -T")
end
desc "Run all module spec tests (Requires rspec-puppet gem)"
task :spec do
system("rspec spec/**/*_spec.rb")
task :specs => [:spec]
desc "Run all rspec-puppet tests"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = ['--color']
# ignores fixtures directory.
t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb'
end
desc "Build package"
task :build do
system("puppet-module build")
end

0
spec/fixtures/manifests/site.pp vendored Normal file

1
spec/fixtures/modules/swift vendored Symbolic link

@ -0,0 +1 @@
../../../

@ -7,5 +7,7 @@ def param_value(subject, type, title, param)
end
RSpec.configure do |c|
c.module_path = File.join(File.dirname(__FILE__), '../../')
c.module_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/modules'))
# Using an empty site.pp file to avoid: https://github.com/rodjek/rspec-puppet/issues/15
c.manifest_dir = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/manifests'))
end