version: 2.1

orbs:
  python: circleci/python@0.2.1

jobs:
  build-and-test:
    executor: python/default
    steps:
      - checkout
      - python/load-cache
      - python/install-deps
      - python/save-cache
      - run:
          command: |
            sudo pip install -r requirements.txt
            sudo python setup.py install
          name: Install snakehouse
      - run:
          command: |
            cd example
            DEBUG=1 python setup.py test
          name: Test

workflows:
  main:
    jobs:
      - build-and-test
