---
sudo: required
language: ruby
dist: trusty
cache: bundler

services:
  - docker

rvm: 2.4.1

before_install:
  - gem update --system # see https://github.com/bundler/bundler/issues/5357

env:
  - INSTANCE=ubuntu-16-04
  - INSTANCE=ubuntu-16-04 CHEF_VERSION=12.5.1
  - INSTANCE=centos-6
  - INSTANCE=centos-6 CHEF_VERSION=12.5.1
  - INSTANCE=centos-7
  - INSTANCE=centos-7 CHEF_VERSION=12.5.1

script:
  - KITCHEN_LOCAL_YAML=.kitchen.dokken.yml bundle exec rake kitchen

matrix:
  fast_finish: true
  include:
    - env: UNIT_AND_LINT=1
      script:
        - bundle exec rake lint spec

---
sudo: required
language: ruby
dist: trusty
cache: bundler

services:
  - docker

rvm: 2.4.1

before_install:
  - gem update --system # see https://github.com/bundler/bundler/issues/5357

env:
  - INSTANCE=ubuntu-16-04
  - INSTANCE=ubuntu-16-04 CHEF_VERSION=12.7.2
  - INSTANCE=centos-6
  - INSTANCE=centos-6 CHEF_VERSION=12.7.2
  - INSTANCE=centos-7
  - INSTANCE=centos-7 CHEF_VERSION=12.7.2

script:
  - KITCHEN_LOCAL_YAML=.kitchen.dokken.yml bundle exec rake kitchen

matrix:
  fast_finish: true
  include:
    - env: UNIT_AND_LINT=1
      script:
        - bundle exec rake lint spec

Use chef 12.7 in the tests of 12 version
Use chef 12.7 in the tests of 12 version

as we need apt_update, and it was added in 12.7
