version: 2

jobs:
  linux:
    docker:
      - image: swift:4.0
      - image: redis
    steps:
      - run: apt-get install -y libssl-dev
      - checkout
      - run: swift build
      - run: swift test

  # 3.1 backward compat checks

  linux-3:
    docker:
      - image: swift:3.1
      - image: redis
    steps:
      - run: apt-get install -y libssl-dev
      - checkout
      - run: swift build
      - run: swift test

workflows:
  version: 2
  tests:
    jobs:
      - linux
      - linux-3

version: 2

jobs:
  macos:
    macos:
      xcode: "9.0"
    steps:
      - run: brew install redis vapor/tap/vapor
      - run: brew services start redis
      - checkout
      - run: swift build
      - run: swift test

  linux:
    docker:
      - image: swift:4.0.3
      - image: redis:3.2
    steps:
      - run: apt-get install -y libssl-dev
      - checkout
      - run: swift build
      - run: swift test

  # 3.1 backward compat checks

  linux-3:
    docker:
      - image: swift:3.1.1
      - image: redis:3.2
    steps:
      - run: apt-get install -y libssl-dev
      - checkout
      - run: swift build
      - run: swift test

workflows:
  version: 2
  tests:
    jobs:
      - macos
      - linux
      - linux-3

Add macOS testing to CircleCI config
Add macOS testing to CircleCI config
