Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.

Commit

Permalink
add rake task for integration testing
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Münch <[email protected]>
  • Loading branch information
atomic111 committed Jul 27, 2016
1 parent 34144cf commit 5f3ee54
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
40 changes: 23 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
---
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
language: python
python: "2.7"
sudo: required
language: ruby
cache: bundler
dist: trusty

env:
- ANSIBLE_VERSION=latest
- ANSIBLE_VERSION=1.9.4
services:
- docker

before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt python-pycurl
install:
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi
- echo -e 'localhost ansible_connection=local' > spec/inventory
- echo -e '[defaults]\nroles_path = ../\nhostfile = ./spec/inventory' > ansible.cfg
- gem --version
- bundle version

script:
- ansible-playbook --syntax-check spec/travis.yml
- ansible-playbook --sudo -v --diff spec/travis.yml
- ansible-playbook --sudo -v --diff spec/travis.yml --extra-vars "network_ipv6_enable=true ssh_allow_root_with_key=true ssh_client_password_login=true ssh_client_cbc_required=true ssh_server_weak_hmac=true ssh_client_weak_kex=true sftp_enabled=true"
matrix:
include:
# verify lint and unit
- rvm: 2.3.1
gemfile: Gemfile
bundler_args: "--without integration guard tools"
# integration tests
- rvm: 2.3.1
bundler_args: "--without guard tools"
script: bundle exec rake test:integration OS='centos oracle'
gemfile: Gemfile
- rvm: 2.3.1
bundler_args: "--without guard tools"
script: bundle exec rake test:integration OS='ubuntu debian'
gemfile: Gemfil
10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env rake
# encoding: utf-8

require 'foodcritic'
require 'rspec/core/rake_task'

# Automatically generate a changelog for this project. Only loaded if
# the necessary gem is installed.
begin
Expand All @@ -9,3 +12,10 @@ begin
rescue LoadError
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
end

desc 'Run integration tests'
task :integration do
concurrency = ENV['CONCURRENCY'] || 1
os = ENV['OS'] || ''
sh('sh', '-c', "bundle exec kitchen test -c #{concurrency} #{os}")
end

0 comments on commit 5f3ee54

Please sign in to comment.