version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.6.1
    working_directory: ~/pythainlp
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ .Branch }}-{{ checksum "requirements.txt" }}
          - v1-dependencies-
      - run:
          name: Install Dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install -r requirements.txt
      - save_cache:
          paths:
            - ./venv
          key: v1-dependencies-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          name: Run Static Analysis
          command: |
            . venv/bin/activate
            pip install flake8
            flake8 tests
      - run:
          name: Run Tests
          command: |
            . venv/bin/activate
            python setup.py test

version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.6.1
    working_directory: ~/pythainlp
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ .Branch }}-{{ checksum "requirements.txt" }}
          - v1-dependencies-
      - run:
          name: Install Dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install -r requirements.txt
      - save_cache:
          paths:
            - ./venv
          key: v1-dependencies-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          name: Run Static Analysis
          command: |
            . venv/bin/activate
            pip install flake8
            make lint
      - run:
          name: Run Tests
          command: |
            . venv/bin/activate
            make test

Use make command to run test and lint
Use make command to run test and lint
