version: 2.1
orbs:
  codecov: codecov/codecov@1.0.5
jobs:
  unittest-lint:
    parallelism: 1
    working_directory: ~/repo
    docker:
      - image: manifoldai/orbyter-ml-dev:latest

    steps:
      - checkout
      - run:
          name: Black lint check
          command: |
            cd swifter && black -l 120 --check .
      - run:
          name: Flake8 lint check
          command: |
            cd swifter && flake8 --max-line-length 120 .
      - run:
          name: Unit tests
          command: |
            pip install pipenv && pipenv install --dev && pip install coverage && pipenv run coverage run -m unittest swifter/swifter_tests.py
      - run:
          name: Codecov report
          command: |
            coverage report -i && coverage html -i
            pip install codecov && codecov --required || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required)
      - store_artifacts:
          path: htmlcov

workflows:
  version: 2
  build-and-test:
    jobs:
      - unittest-lint

version: 2.1
orbs:
  codecov: codecov/codecov@1.0.5
jobs:
  unittest-lint:
    parallelism: 1
    working_directory: ~/repo
    docker:
      - image: python:3.6

    steps:
      - checkout
      - run:
          name: Black lint check
          command: |
            pip install black && cd swifter && black -l 120 --check .
      - run:
          name: Flake8 lint check
          command: |
            pip install flake8 && cd swifter && flake8 --max-line-length 120 .
      - run:
          name: Unit tests
          command: |
            pip install pipenv && pipenv install --dev && pip install coverage && pipenv run coverage run -m unittest swifter/swifter_tests.py
      - run:
          name: Codecov report
          command: |
            coverage report -i && coverage html -i
            pip install codecov && codecov --required || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required)
      - store_artifacts:
          path: htmlcov

workflows:
  version: 2
  build-and-test:
    jobs:
      - unittest-lint

Switch to python 3.6 base image for CI
Switch to python 3.6 base image for CI
