matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
    - os: osx
      osx_image: xcode8

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update   ; fi

  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -y ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://swift.org/builds/swift-3.0.2-release/ubuntu1404/swift-3.0.2-RELEASE/swift-3.0.2-RELEASE-ubuntu14.04.tar.gz    ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xzvf swift-3.0.2-RELEASE-ubuntu14.04.tar.gz    ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=swift-3.0.2-RELEASE-ubuntu14.04/usr/bin:$PATH    ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install nodejs; fi

script:
  - npm install
  - swift build
  - swift test 


matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
    - os: osx
      osx_image: xcode9.1

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update   ; fi

  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -y ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://swift.org/builds/swift-4.0.2-release/ubuntu1404/swift-4.0.2-RELEASE/swift-4.0.2-RELEASE-ubuntu14.04.tar.gz    ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xzvf swift-4.0.2-RELEASE-ubuntu14.04.tar.gz    ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=swift-4.0.2-RELEASE-ubuntu14.04/usr/bin:$PATH    ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install nodejs; fi

script:
  - npm install
  - swift build
  - swift test 


Fix TravisCI by updating to Swift 4.0.2
Fix TravisCI by updating to Swift 4.0.2
