version: 2
jobs:
  build:
    docker:
      - image: circleci/python:2.7.15-jessie-browsers
    steps:
      - checkout
      - run:
          name: Download Selenium
          command: |
            curl -O http://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar
      - run:
          name: Start Selenium
          command: |
            java -jar selenium-server-standalone-3.5.3.jar -log test-reports/selenium.log
          background: true
      - restore_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
      - run:
          name: Install Python deps in a venv
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install -r requirements-dev.txt
      - save_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
          paths:
            - "venv"
      - run:
          command: |
            . venv/bin/activate
            python manage.py migrate
      - run:
          command: |
            . venv/bin/activate
            coverage run --source='.'
            python manage.py test
      - store_artifacts:
          path: test-reports/
          destination: tr1
      - store_test_results:
          path: test-reports/

version: 2
jobs:
  build:
    docker:
      - image: circleci/python:2.7.15-jessie-browsers
    steps:
      - checkout
      - run:
          name: Download Selenium
          command: |
            curl -O http://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar
      - run:
          name: Start Selenium
          command: |
            java -jar selenium-server-standalone-3.5.3.jar -log test-reports/selenium.log
          background: true
      - restore_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements-dev.txt" }}
      - run:
          name: Install Python deps in a venv
          command: |
            python -m venv venv
            . venv/bin/activate
            pip install -r requirements-dev.txt
      - save_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements-dev.txt" }}
          paths:
            - "venv"
      - run:
          command: |
            . venv/bin/activate
            python manage.py migrate
      - run:
          command: |
            . venv/bin/activate
            coverage run --source='.'
            python manage.py test
      - store_artifacts:
          path: test-reports/
          destination: tr1
      - store_test_results:
          path: test-reports/

Fix python3 usage in venv, fix reference to requirements/dev.txt
Fix python3 usage in venv, fix reference to requirements/dev.txt
