version: 2
jobs:
  build:
    docker:
      - image: openchemistry/mongochemserver:latest
        environment:
          - CIRCLE_BRANCH: ${CIRCLE_BRANCH}
          - CIRCLE_BUILD_NUM: ${CIRCLE_BUILD_NUM}
      - image: mongo:latest
    working_directory: /mongochemserver
    steps:
      - checkout
      - run:
          name: Install requirements
          command: >
            pip install --no-cache-dir -r /mongochemserver/requirements.txt &&
            pip install --no-cache-dir -r /mongochemserver/requirements-dev.txt
      - run:
          name: Install the plugins
          command: >
            girder-install plugin -f /mongochemserver/girder/molecules &&
            girder-install plugin -f /mongochemserver/girder/notebooks

      - run:
          name: Install girder_pytest
          command: >
            git clone -b 2.x-maintenance https://github.com/girder/girder.git /girder_pytest &&
            cd /girder_pytest &&
            pip install --no-cache-dir -r requirements-dev.txt
      - run:
          name: Run pytest
          command: 'pytest ./girder/molecules/plugin_tests/'

workflows:
  version: 2
  ci:
    jobs:
      - build

version: 2
jobs:
  build:
    docker:
      - image: openchemistry/mongochemserver:latest
        environment:
          - CIRCLE_BRANCH: ${CIRCLE_BRANCH}
          - CIRCLE_BUILD_NUM: ${CIRCLE_BUILD_NUM}
      - image: mongo:latest
    working_directory: /mongochemserver
    steps:
      - checkout
      - run:
          name: Install requirements
          command: >
            pip install -U --no-cache-dir -r /mongochemserver/requirements.txt &&
            pip install -U --no-cache-dir -r /mongochemserver/requirements-dev.txt
      - run:
          name: Install the plugins
          command: >
            girder-install plugin -f /mongochemserver/girder/molecules &&
            girder-install plugin -f /mongochemserver/girder/notebooks

      - run:
          name: Install girder_pytest
          command: >
            git clone -b 2.x-maintenance https://github.com/girder/girder.git /girder_pytest &&
            cd /girder_pytest &&
            pip install --no-cache-dir -r requirements-dev.txt
      - run:
          name: Run pytest
          command: 'pytest ./girder/molecules/plugin_tests/'

workflows:
  version: 2
  ci:
    jobs:
      - build

Use -U when install requirement.txt
Use -U when install requirement.txt

This ensures that we get the latest versions.
