version: 2
jobs:
  build:
    working_directory: ~/phobos
    docker:
      - image: circleci/node:4.8.2
    parallelism: 1
    steps:
      - checkout
      - run:
          command: ./.circleci/run.sh install-deps
          name: Install DMD
      - run:
          command: ./.circleci/run.sh setup-repos
          name: Clone DMD & DRuntime
      - run:
          command: sudo apt-get update && sudo apt-get install -y gdb
          name: Install gdb
      - run:
          command: ./.circleci/run.sh style_lint
          name: Run code style & linter
      - run:
          command: ./.circleci/run.sh publictests
          name: Run all public unittests
      - run:
          command: ./.circleci/run.sh coverage
          name: Run Phobos testsuite with -cov
      - run:
          command: bash <(curl -s https://codecov.io/bash)
          name: Upload coverage files to CodeCov
