# AppVeyor.com is a Continuous Integration service to build and run tests under
# Windows
platform:
    - x64

environment:
    # Appveyor machines come with miniconda already installed.
    CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"

    global:
        MINICONDA_VERSION: "latest"
        ASTROPY_USE_SYSTEM_PYTEST: 1
        PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix
                          # of 32 bit and 64 bit builds are needed, move this
                          # to the matrix section.

    matrix:

        - PYTHON_VERSION: "3.5"
          NUMPY_VERION: "stable"
          ASTROPY_VERSION: "stable"

        - PYTHON_VERSION: "3.6"
          NUMPY_VERSION: "stable"
          ASTROPY_VERSION: "stable"

        - PYTHON_VERSION: "3.7"
          NUMPY_VERSION: "stable"
          ASTROPY_VERSION: "stable"

        - PYTHON_VERSION: "3.7"
          NUMPY_VERSION: "stable"
          ASTROPY_VERSION: "development"
 
        - PYTHON_VERSION: "3.8"
          NUMPY_VERSION: "stable"
          ASTROPY_VERSION: "development"


matrix:
    fast_finish: true

# os: Visual Studio 2015 Update 2
install:
    - cmd: set OLDPATH=%PATH%
    - cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\Scripts;%PATH%
    - cmd: conda update --yes conda
    - cmd: conda config --set always_yes true
    - cmd: conda config --set show_channel_urls true
    - cmd: conda config --set changeps1 no
    - cmd: conda config --add channels conda-forge
    - cmd: set PATH=%OLDPATH%
    - cmd: set OLDPATH=
    - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
    - cmd: set PYTHONUNBUFFERED=1
    - cmd: conda install scipy matplotlib numpy astropy ipython sphinx pytest pytest-cov
    - cmd: git submodule update --init --recursive
    - cmd: conda info -a

# Not a .NET project, we build in the install step instead
build: off

test_script:
    - cmd: python setup.py test