version: 2
jobs:
  py3test:
    docker:
      - image: circleci/python:3.7
    working_directory: ~/monty
    steps:
      - checkout
      - run:
          command: |
            python3 -m venv test_env
            source test_env/bin/activate
            pip install -q numpy
            pip install -r requirements-ci.txt
            python setup.py develop
      - run:
          command: |
            source test_env/bin/activate
            # Add executables and path.
            pytest --cov=monty --cov-report html:coverage_reports monty tests
            coveralls
      - store_artifacts:
          path: coverage_reports/
          destination: tr1
      - store_test_results:
          path: coverage_reports/
  linting:
    docker:
      - image: circleci/python:3.7
    working_directory: ~/monty
    steps:
      - checkout
      - run:
          command: |
            python3 -m venv test_env
            source test_env/bin/activate
            pip install --upgrade pycodestyle mypy pydocstyle flake8
            # Add executables and path.
            pytest --cov=monty --cov-report html:coverage_reports monty tests
            pycodestyle monty
            pydocstyle monty
            mypy monty tests
            flake8 --count --show-source --statistics monty

workflows:
  version: 2
  build_and_test:
    jobs:
      - py3test
      - linting
version: 2
jobs:
  py3test:
    docker:
      - image: circleci/python:3.7
    working_directory: ~/monty
    steps:
      - checkout
      - run:
          command: |
            python3 -m venv test_env
            source test_env/bin/activate
            pip install -q numpy
            pip install -r requirements-ci.txt
            python setup.py develop
      - run:
          command: |
            source test_env/bin/activate
            # Add executables and path.
            pytest --cov=monty --cov-report html:coverage_reports monty tests
            coveralls
      - store_artifacts:
          path: coverage_reports/
          destination: tr1
      - store_test_results:
          path: coverage_reports/
  linting:
    docker:
      - image: circleci/python:3.7
    working_directory: ~/monty
    steps:
      - checkout
      - run:
          command: |
            python3 -m venv test_env
            source test_env/bin/activate
            pip install --upgrade pycodestyle mypy pydocstyle flake8
            # Add executables and path.
            pycodestyle monty
            pydocstyle monty
            mypy monty tests
            flake8 --count --show-source --statistics monty

workflows:
  version: 2
  build_and_test:
    jobs:
      - py3test
      - linting
Remove test from linting in circle.
Remove test from linting in circle.
