Skip to content

Commit

Permalink
Merge pull request #16 from ghoneycutt/update_travis_checks
Browse files Browse the repository at this point in the history
Update travis to validate and lint code
  • Loading branch information
ghoneycutt committed Aug 19, 2013
2 parents 1c83932 + a4ff4ec commit 9b11fd1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
20 changes: 6 additions & 14 deletions .travis.yml
@@ -1,24 +1,16 @@
---
env:
- PUPPET_VERSION=2.6.9
- PUPPET_VERSION=2.7.13
- PUPPET_VERSION=3.2.1
- PUPPET_VERSION=2.7.22
- PUPPET_VERSION=3.2.4
notifications:
email: false
global:
- PUBLISHER_LOGIN=ghoneycutt
- secure: |-
fSNt35EMHQ0nqBnvut1DP5jOqzYHLCUq83miWD//qShKwfCaeRREcl22uZBQ
AqNPtoR7qW1dGZgFQjnEiY6Cx969S0imGswdAoIgbblkiyJHvqNHAidRSUGG
wsb82BNaH4XAk09v5HYiAYOkOEj8LidFZMLe683s1XFeVT1pcMo=
rvm:
- 1.9.3
- 1.8.7
matrix:
allow_failures:
- env: PUPPET_VERSION=2.6.9
- env: PUPPET_VERSION=2.7.22
language: ruby
before_script: gem install --no-ri --no-rdoc bundler
script:
- rake spec
gemfile: .gemfile
before_script: "gem install --no-ri --no-rdoc bundler"
script: 'bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec'
gemfile: Gemfile
3 changes: 2 additions & 1 deletion .gemfile → Gemfile
@@ -1,6 +1,7 @@
source :rubygems
source "https://rubygems.org"

puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 0.3.2'
gem 'facter', '>= 1.7.0', "< 1.8.0"
9 changes: 9 additions & 0 deletions Rakefile
@@ -1,3 +1,12 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

desc "Run puppet in noop mode and check for syntax errors."
task :validate do
Dir['manifests/**/*.pp'].each do |path|
sh "puppet parser validate --noop #{path}"
end
end
Empty file removed spec/fixtures/manifests/site.pp
Empty file.

0 comments on commit 9b11fd1

Please sign in to comment.