machine:
  python:
    version: '2.7.14'
  pre:
    - git -C ~/.pyenv pull

  environment:
    DJANGO_SETTINGS_MODULE: 'stackdio.server.settings.testing'

  services:
    - mysql

## Customize dependencies
dependencies:
  override:
    - bower install
    - pip install -U pip
    - pip install -U wheel
    - pip install -U -e .[testing,mysql]

## Customize test commands
test:
  pre:
    - mkdir ~/.stackdio

  override:
    # Copy the config file over to use mysql
    - cp tests/stackdio-circle.yaml /home/ubuntu/.stackdio/stackdio.yaml

    # Run init to make sure the salt config files are in place
    - stackdio init --no-prompt

    # Run migration and tests on the default config file first
    - python manage.py migrate
    - py.test --cov=stackdio --cov-report=html --junit-xml=tests.xml stackdio

  post:
    - mv tests.xml $CIRCLE_TEST_REPORTS/stackdio-tests.xml
    - mv htmlcov $CIRCLE_ARTIFACTS/coverage

deployment:
  artifact:
    branch: /.*/
    commands:
      - python manage.py build_ui
      - python setup.py sdist
      - python setup.py bdist_wheel
      - mv dist/ $CIRCLE_ARTIFACTS/dist/

machine:
  python:
    version: '2.7.11'
  pre:
    - git -C ~/.pyenv pull

  environment:
    DJANGO_SETTINGS_MODULE: 'stackdio.server.settings.testing'

  services:
    - mysql

## Customize dependencies
dependencies:
  override:
    - bower install
    - pip install -U pip
    - pip install -U wheel
    - pip install -U -e .[testing,mysql]

## Customize test commands
test:
  pre:
    - mkdir ~/.stackdio

  override:
    # Copy the config file over to use mysql
    - cp tests/stackdio-circle.yaml /home/ubuntu/.stackdio/stackdio.yaml

    # Run init to make sure the salt config files are in place
    - stackdio init --no-prompt

    # Run migration and tests on the default config file first
    - python manage.py migrate
    - py.test --cov=stackdio --cov-report=html --junit-xml=tests.xml stackdio

  post:
    - mv tests.xml $CIRCLE_TEST_REPORTS/stackdio-tests.xml
    - mv htmlcov $CIRCLE_ARTIFACTS/coverage

deployment:
  artifact:
    branch: /.*/
    commands:
      - python manage.py build_ui
      - python setup.py sdist
      - python setup.py bdist_wheel
      - mv dist/ $CIRCLE_ARTIFACTS/dist/

Revert to 2.7.11 for speed
Revert to 2.7.11 for speed
