version: 2
workflows:
  version: 2
  build:
    jobs:
      - build:
          context: tuist
jobs:
  build:
    macos:
      xcode: "10.2.0"
    steps:
      - checkout
      - restore_cache:
          keys:
            - 1-gems-{{ checksum "Gemfile.lock" }}
      - run:
          name: Install Tools
          command: |
            brew install swiftformat
            brew install swiftlint
            bundle config build.sqlite3 --with-sqlite3-dir=/opt/local
      - run:
          name: Install dependencies
          command: |
            bundle check || bundle install --path vendor/bundle
      - run:
          name: Run Danger
          command: bundle exec danger
      - run:
          name: Release build
          command: |
            swift build -c release
      - run:
          name: Run tests
          command: |
            swift package generate-xcodeproj
            xcodebuild test -project XcodeProj.xcodeproj -scheme XcodeProj-Package -enableCodeCoverage YES
      - run:
          name: Send test coverage report
          command: |
            bash <(curl -s https://codecov.io/bash)
      - save_cache:
          key: gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle

version: 2
workflows:
  version: 2
  build:
    jobs:
      - build:
          context: tuist
jobs:
  build:
    macos:
      xcode: "10.2.1"
    steps:
      - checkout
      - restore_cache:
          keys:
            - 1-gems-{{ checksum "Gemfile.lock" }}
      - run:
          name: Install Tools
          command: |
            brew install swiftformat
            brew install swiftlint
            bundle config build.sqlite3 --with-sqlite3-dir=/opt/local
      - run:
          name: Install dependencies
          command: |
            bundle check || bundle install --path vendor/bundle
      - run:
          name: Run Danger
          command: bundle exec danger
      - run:
          name: Release build
          command: |
            swift build -c release
      - run:
          name: Run tests
          command: |
            swift package generate-xcodeproj
            xcodebuild test -project XcodeProj.xcodeproj -scheme XcodeProj-Package -enableCodeCoverage YES
      - run:
          name: Send test coverage report
          command: |
            bash <(curl -s https://codecov.io/bash)
      - save_cache:
          key: gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle

Use the latest Xcode version
Use the latest Xcode version
