Permalink
Browse files

Merge pull request #835 from boxen/travis-osx-test

Add .travis.yml for OSX testing
  • Loading branch information...
2 parents 2cd9577 + 4fd2d7d commit a61b60d22a60ba24d1c0f6bf0dcd48e63cafc344 @jacobbednarz jacobbednarz committed on GitHub Jan 14, 2017
View
@@ -0,0 +1,3 @@
+--color
+--format documentation
+--order random
View
@@ -0,0 +1,12 @@
+os:
+- osx
+script:
+- travis_wait rvm implode --force
+- travis_wait 60 ./script/boxen --no-fde --no-pull --profile --login $BOXEN_GITHUB_LOGIN --token $BOXEN_GITHUB_TOKEN || test $? -eq 2
+- source /opt/boxen/env.sh
+- rake spec
+before_install:
+- sudo gem install bundler -v '~> 1.13'
+env:
+ global:
+ secure: HoCPuAgujmw+tdH7qq9bSymtpE8o4gpp1uYRyFin2TB3px2JdOPCPCb754vddmE12zhhKKSy1j0Uj/qeW6tjy9hIhlAjLAGFuT+mNTURqu4nmojCgKO2ApcRWc3yv319XR2vjUDW1qmEyKm7il4q1c/dOFmGbVYeDixjUUfWVII=
View
@@ -11,6 +11,10 @@ gem "rake", "10.3.2"
gem "rspec-puppet", "1.0.1"
gem "deep_merge", "~> 1.0"
+group :test do
+ gem "serverspec"
+end
+
group :development do
gem "aws-sdk-core", "~> 2.0.11"
gem "net-ssh"
View
@@ -41,7 +41,10 @@ GEM
metaclass (~> 0.0.1)
multi_json (1.11.0)
multipart-post (2.0.0)
+ net-scp (1.2.1)
+ net-ssh (>= 2.6.5)
net-ssh (2.9.2)
+ net-telnet (0.1.1)
octokit (2.7.2)
sawyer (~> 0.5.2)
open4 (1.3.4)
@@ -65,6 +68,9 @@ GEM
rspec-expectations (3.2.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
+ rspec-its (1.2.0)
+ rspec-core (>= 3.0.0)
+ rspec-expectations (>= 3.0.0)
rspec-mocks (3.2.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
@@ -74,6 +80,17 @@ GEM
sawyer (0.5.5)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
+ serverspec (2.37.2)
+ multi_json
+ rspec (~> 3.0)
+ rspec-its
+ specinfra (~> 2.53)
+ sfl (2.3)
+ specinfra (2.66.3)
+ net-scp
+ net-ssh (>= 2.7, < 4.0)
+ net-telnet
+ sfl
thor (0.19.1)
PLATFORMS
@@ -92,3 +109,7 @@ DEPENDENCIES
puppetlabs_spec_helper (= 0.4.1)
rake (= 10.3.2)
rspec-puppet (= 1.0.1)
+ serverspec
+
+BUNDLED WITH
+ 1.10.5
View
@@ -0,0 +1,27 @@
+require 'rake'
+require 'rspec/core/rake_task'
+
+task :spec => 'spec:all'
+task :default => :spec
+
+namespace :spec do
+ targets = []
+ Dir.glob('./spec/*').each do |dir|
+ next unless File.directory?(dir)
+ target = File.basename(dir)
+ target = "_#{target}" if target == "default"
+ targets << target
+ end
+
+ task :all => targets
+ task :default => :all
+
+ targets.each do |target|
+ original_target = target == "_default" ? target[1..-1] : target
+ desc "Run serverspec tests to #{original_target}"
+ RSpec::Core::RakeTask.new(target.to_sym) do |t|
+ ENV['TARGET_HOST'] = original_target
+ t.pattern = "spec/#{original_target}/*_spec.rb"
+ end
+ end
+end
View
@@ -152,7 +152,7 @@ end
# Make sure our local dependencies are up to date.
-strap = %w(script/bootstrap --quiet --deployment --local --without development:test --no-cache)
+strap = %w(script/bootstrap --quiet --deployment --local --without development --no-cache)
abort "Can't bootstrap, dependencies are outdated." unless system *strap
# Set up our local configuration, deps, and load path.
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe file('/opt/boxen/repo') do
+ it { should be_directory }
+end
View
@@ -0,0 +1,4 @@
+require 'serverspec'
+
+set :backend, :exec
+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit a61b60d

Please sign in to comment.