branches:
  only:
    - master
    - develop
    - /^hotfix.*$/
    - /^feature.*$/

matrix:
  include:
    - os: linux
      install: 
        - gem install bundler
        - bundler install
      before_script:
        - bundle exec danger
      before_install:
        - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
        - wget -q https://swift.org/builds/swift-4.0-branch/ubuntu1404/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-21-a/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-21-a-ubuntu14.04.tar.gz
        - tar xzf swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-21-a-ubuntu14.04.tar.gz
        - export PATH=${PWD}/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-21-a-ubuntu14.04/usr/bin:"${PATH}"
      script:
        - make travis
    - os: osx
      osx_image: xcode9
      sudo: required
      env: CODECOV_TOKEN=$CODECOV_TOKEN
      script:
        - make travisosx

branches:
  only:
    - master
    - develop
    - /^hotfix.*$/
    - /^feature.*$/

matrix:
  include:
    - os: linux
      install: 
        - gem install bundler
        - bundler install
      before_script:
        - bundle exec danger
      before_install:
        - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
        - wget -q https://swift.org/builds/swift-4.0-branch/ubuntu1404/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-31-a/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-31-a-ubuntu14.04.tar.gz
        - tar xzf swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-31-a-ubuntu14.04.tar.gz
        - export PATH=${PWD}/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-08-31-a-ubuntu14.04/usr/bin:"${PATH}"
      script:
        - make travis
    - os: osx
      osx_image: xcode9
      sudo: required
      env: CODECOV_TOKEN=$CODECOV_TOKEN
      script:
        - make travisosx

Use latest version of Swift 4.0 toolchain
Use latest version of Swift 4.0 toolchain
