# https://circleci.com/gh/spyder-ide/loghub

machine:
  environment:
    # Used by qthelpers to close widgets after a defined time
    TEST_CI: "True"
    # Python versions to tests (Maximum of 4 different versions)
    PY_VERSIONS: "3.5"
    # Environment variables used by astropy helpers
    TRAVIS_OS_NAME: "linux"

dependencies:
  override:
    # First convert PY_VERSIONS to an array and then select the python version based on the CIRCLE_NODE_INDEX
    - export PY_VERSIONS=($PY_VERSIONS) &&
      export TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]} && 
      echo -e "PYTHON = $TRAVIS_PYTHON_VERSION \n============" &&
      git clone git://github.com/astropy/ci-helpers.git &&
      source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh &&
      export PATH="$HOME/miniconda/bin:$PATH" &&
      source activate test &&
      conda install pytest &&
      conda install pytest-cookies -c conda-forge &&
      conda install ciocheck -c conda-forge;

test:
  override:
    # Run tests
    - export PATH="$HOME/miniconda/bin:$PATH" && source activate test && pytest: # note the colon
        parallel: true

# https://circleci.com/gh/spyder-ide/loghub

machine:
  environment:
    # Used by qthelpers to close widgets after a defined time
    TEST_CI: "True"
    # Python versions to tests (Maximum of 4 different versions)
    PY_VERSIONS: "3.5"
    # Environment variables used by astropy helpers
    TRAVIS_OS_NAME: "linux"

dependencies:
  override:
    # First convert PY_VERSIONS to an array and then select the python version based on the CIRCLE_NODE_INDEX
    - export PY_VERSIONS=($PY_VERSIONS) &&
      export TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]} && 
      echo -e "PYTHON = $TRAVIS_PYTHON_VERSION \n============" &&
      git clone git://github.com/astropy/ci-helpers.git &&
      source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh &&
      export PATH="$HOME/miniconda/bin:$PATH" &&
      source activate test &&
      conda install pytest cookiecutter -c conda-forge &&
      conda install pytest entrypoints -c conda-forge &&
      conda install pytest-cookies -c conda-forge &&
      conda install versioneer -c conda-forge &&
      conda install ciocheck -c conda-forge;
    - export PATH="$HOME/miniconda/bin:$PATH" && source activate test &&
      cd .. &&
      cookiecutter spyder-plugin-cookiecutter --no-input &&
      cd spyder-demo-plugin &&
      python setup.py develop;

test:
  override:
    # Run tests
    - export PATH="$HOME/miniconda/bin:$PATH" && source activate test && pytest: # note the colon
        parallel: true

Add test for plugin building.
Add test for plugin building.
