Skip to content

Commit

Permalink
Run test-kitchen with Travis CI native Docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
zuazo committed Oct 2, 2015
1 parent 17af639 commit 1cddd6a
Showing 1 changed file with 82 additions and 7 deletions.
89 changes: 82 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,94 @@ rvm:
- 2.1
- 2.2

sudo: true
sudo: required

services: docker

env:
- CHEF_VERSION="~> 11.0"
- CHEF_VERSION="~> 12.0"
matrix:
# CHEF_VERSION is only for unit tests, no for test-kitchen:
- TESTS="style unit" CHEF_VERSION="~> 11.0"
- TESTS="style unit" CHEF_VERSION="~> 12.0"
# Split up the test-kitchen run to avoid exceeding 50 minutes:
- TESTS="integration[mysql-centos-6,verify]"
- TESTS="integration[mysql-debian-7,verify]"
- TESTS="integration[mysql-debian-8,verify]"
- TESTS="integration[mysql-scientific-66,verify]"
- TESTS="integration[sqlite-centos-6,verify]"
- TESTS="integration[sqlite-debian-7,verify]"
- TESTS="integration[sqlite-debian-8,verify]"
- TESTS="integration[sqlite-ubuntu-1204,verify]"
- TESTS="integration[sqlite-ubuntu-1404,verify]"
- TESTS="integration[sqlite-ubuntu-1504,verify]"
- TESTS="integration[sqlite-scientific-66,verify]"
- TESTS="integration[nginx-debian-7,verify]"
- TESTS="integration[nginx-debian-8,verify]"

matrix:
exclude:
# Chef 11 cannot resolve dependencies in Ruby 2.2 (mixlib-shellout):
- rvm: 2.2
env: CHEF_VERSION="~> 11.0"
env: TESTS="style unit" CHEF_VERSION="~> 11.0"
# Disable integration tests in old Ruby versions:
- rvm: 2.0.0
env: TESTS="integration[mysql-centos-6,verify]"
- rvm: 2.1
env: TESTS="integration[mysql-centos-6,verify]"
- rvm: 2.0.0
env: TESTS="integration[mysql-debian-7,verify]"
- rvm: 2.1
env: TESTS="integration[mysql-debian-7,verify]"
- rvm: 2.0.0
env: TESTS="integration[mysql-debian-8,verify]"
- rvm: 2.1
env: TESTS="integration[mysql-debian-8,verify]"
- rvm: 2.0.0
env: TESTS="integration[mysql-scientific-66,verify]"
- rvm: 2.1
env: TESTS="integration[mysql-scientific-66,verify]"
- rvm: 2.0.0
env: TESTS="integration[sqlite-centos-6,verify]"
- rvm: 2.1
env: TESTS="integration[sqlite-centos-6,verify]"
- rvm: 2.0.0
env: TESTS="integration[sqlite-debian-7,verify]"
- rvm: 2.1
env: TESTS="integration[sqlite-debian-7,verify]"
- rvm: 2.0.0
env: TESTS="integration[sqlite-debian-8,verify]"
- rvm: 2.1
env: TESTS="integration[sqlite-debian-8,verify]"
- rvm: 2.0.0
env: TESTS="integration[sqlite-ubuntu-1204,verify]"
- rvm: 2.1
env: TESTS="integration[sqlite-ubuntu-1204,verify]"
- rvm: 2.0.0
env: TESTS="integration[sqlite-ubuntu-1404,verify]"
- rvm: 2.1
env: TESTS="integration[sqlite-ubuntu-1404,verify]"
- rvm: 2.0.0
env: TESTS="integration[sqlite-ubuntu-1504,verify]"
- rvm: 2.1
env: TESTS="integration[sqlite-ubuntu-1504,verify]"
- rvm: 2.0.0
env: TESTS="integration[sqlite-scientific-66,verify]"
- rvm: 2.1
env: TESTS="integration[sqlite-scientific-66,verify]"
- rvm: 2.0.0
env: TESTS="integration[nginx-debian-7,verify]"
- rvm: 2.1
env: TESTS="integration[nginx-debian-7,verify]"
- rvm: 2.0.0
env: TESTS="integration[nginx-debian-8,verify]"
- rvm: 2.1
env: TESTS="integration[nginx-debian-8,verify]"

before_install: curl -L https://www.getchef.com/chef/install.sh | sudo bash -s -- -P chefdk -v 0.8.0

install: chef exec bundle install --jobs=3 --retry=3 --without='doc integration_vagrant integration_cloud guard'

bundler_args: --jobs=3 --retry=3 --without='doc integration integration_vagrant integration_docker integration_cloud guard'
# https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142455888
before_script: sudo iptables -L DOCKER || sudo iptables -N DOCKER

script:
- bundle exec rake style unit
script: travis_retry chef exec bundle exec rake $TESTS

0 comments on commit 1cddd6a

Please sign in to comment.