forked from nmadhok/wordpress-formula
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from fintanmm/master
Lay the ground work for integration with travis-ci.org
- Loading branch information
Showing
5 changed files
with
121 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
language: php | ||
|
||
rvm: | ||
- 2.2.5 | ||
|
||
sudo: required | ||
services: | ||
- docker | ||
- mysql | ||
- apache | ||
|
||
env: | ||
matrix: | ||
- INSTANCE: high-ubuntu-1404 | ||
- INSTANCE: high-ubuntu-1604 | ||
- INSTANCE: high-debian-7 | ||
- INSTANCE: high-debian-8 | ||
- INSTANCE: high-centos-6 | ||
- INSTANCE: cli-ubuntu-1404 | ||
- INSTANCE: cli-ubuntu-1604 | ||
- INSTANCE: cli-debian-7 | ||
- INSTANCE: cli-debian-8 | ||
- INSTANCE: cli-centos-6 | ||
- INSTANCE: config-ubuntu-1404 | ||
- INSTANCE: config-ubuntu-1604 | ||
- INSTANCE: config-debian-7 | ||
- INSTANCE: config-debian-8 | ||
- INSTANCE: config-centos-6 | ||
|
||
# https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142455888 | ||
before_script: | ||
- sudo iptables -L DOCKER || sudo iptables -N DOCKER | ||
- sudo apt-get install git | ||
- git clone https://github.com/saltstack-formulas/apache-formula.git /tmp/kitchen/srv/salt/apache | ||
- git clone https://github.com/saltstack-formulas/php-formula.git /tmp/kitchen/srv/salt/php | ||
- git clone https://github.com/saltstack-formulas/mysql-formula.git /tmp/kitchen/srv/salt/mysql | ||
|
||
install: | ||
# setup ci for test formula | ||
- export BUNDLE_GEMFILE=$PWD/Gemfile | ||
- bundle install | ||
|
||
script: bundle exec kitchen verify ${INSTANCE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'codeclimate-test-reporter', group: :test, require: nil | ||
gem 'rake' | ||
gem 'berkshelf', '~> 4.0' | ||
|
||
group :integration do | ||
gem 'test-kitchen' | ||
gem 'kitchen-salt' | ||
gem 'kitchen-inspec' | ||
end | ||
|
||
group :docker do | ||
gem 'kitchen-docker' | ||
end | ||
|
||
# vi: set ft=ruby : | ||
gem "kitchen-vagrant" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
require 'rake' | ||
require 'rake/testtask' | ||
require 'bundler/setup' | ||
|
||
Rake::TestTask.new do |t| | ||
t.libs << 'lib' | ||
t.pattern = 'test/**/*_test.rb' | ||
t.verbose = false | ||
end | ||
|
||
desc 'Run Test Kitchen integration tests' | ||
namespace :integration do | ||
desc 'Run integration tests with kitchen-docker' | ||
task :docker do | ||
require 'kitchen' | ||
Kitchen.logger = Kitchen.default_file_logger | ||
@loader = Kitchen::Loader::YAML.new(local_config: '.kitchen.docker.yml') | ||
Kitchen::Config.new(loader: @loader).instances.each do |instance| | ||
instance.test(:always) | ||
end | ||
end | ||
end | ||
|
||
task default: :test | ||
|
||
begin | ||
require 'kitchen/rake_tasks' | ||
Kitchen::RakeTasks.new | ||
rescue LoadError | ||
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI'] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require "serverspec" | ||
require "pathname" | ||
|
||
# Set backend type | ||
set :backend, :exec | ||
|
||
RSpec.configure do |c| | ||
c.path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | ||
end |