machine:
  python:
    version: 2.7.10
dependencies:
  override:
    - "pip install -U pip wheel"
    # Temporarily pin setuptools to a specific version.
    # See commit message of https://github.com/open-craft/problem-builder/commit/51277a34fb426724616618c1afdb893ab2de4c6b for more info:
    - "pip install setuptools==24.3.1"
    - "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk"
    - "pip install -r requirements.txt"
    - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt"
    - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt"
    - "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-2.6.10.tar.gz"
    - "pip install -r test_requirements.txt"
    - "mkdir var"
test:
  override:
    - "if [ $CIRCLE_NODE_INDEX = '0' ]; then pep8 problem_builder --max-line-length=120; fi":
        parallel: true
    - "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi":
        parallel: true
    - "python run_tests.py":
        parallel: true
        files:
          - "problem_builder/v1/tests/**/*.py"
          - "problem_builder/tests/**/*.py"
