language: objective-c
osx_image: xcode8

before_script:
  - brew install couchdb
  - brew services start couchdb

script:
  - swift build && swift test

language: generic

script:
  - swift build && swift test

matrix:
  allow_failures:
    - os: linux
  include:
    - os: linux
      dist: trusty
      sudo: required
      before_script:
          - sudo apt-get update
          - sudo apt-get install -y build-essential git libcurl3 libblocksruntime-dev clang libicu-dev uuid-dev
          - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
          - gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
          - wget https://swift.org/builds/swift-3.0-release/ubuntu1404/swift-3.0-RELEASE/swift-3.0-RELEASE-ubuntu14.04.tar.gz
          - gunzip swift-3.0-RELEASE-ubuntu14.04.tar.gz
          - tar -xvf swift-3.0-RELEASE-ubuntu14.04.tar
          - export PATH=${PWD}/swift-3.0-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
    - os: osx
      language: objective-c
      osx_image: xcode8
      before_script:
        - brew install couchdb
        - brew services start couchdb

services:
    - couchdb

Enable swift testing on linux.
Enable swift testing on linux.

- Add Linux environment to test matrix
- Allow Linux builds to fail and not fail the overall build.
