version: 1.0.{build}
environment:
  PYTHON_LOC: "C:\\Miniconda36-x64"

skip_tags: true

install:
  - cmd: call %PYTHON_LOC%\Scripts\activate.bat
  - cmd: conda config --set always_yes yes --set changeps1 no
  - cmd: conda config --append channels conda-forge
  - cmd: conda update -q --all
  - ps: (get-content test-environment.yaml) | %{$_ -replace "\$\{PYTHON\}","3.5"} | set-content test-environment.yaml
  - cmd: conda env create -qf test-environment.yaml
  - cmd: git checkout -- test-environment.yaml
  - ps: (get-content test-environment.yaml) | %{$_ -replace "\$\{PYTHON\}","3.6"} | set-content test-environment.yaml
  - cmd: conda env create -qf test-environment.yaml
  - cmd: conda info -a
  - PS: Write-Host "Packages in py3.5 Environment:"
  - cmd: conda list -n py3.5
  - PS: Write-Host "Packages in py3.6 Environment:"
  - cmd: conda list -n py3.6

build_script:
  - cmd: call %PYTHON_LOC%\Scripts\activate.bat py3.5
  - cmd: pytest -vv --cov=./ --cov-append
  - cmd: call %PYTHON_LOC%\Scripts\activate.bat py3.6
  - cmd: pytest -vv --cov=./ --cov-append
  - cmd: codecov -X gcov

version: 1.0.{build}
environment:
  PYTHON_LOC: "C:\\Miniconda36-x64"

skip_tags: true

install:
  - cmd: call %PYTHON_LOC%\Scripts\activate.bat
  - cmd: conda config --set always_yes yes --set changeps1 no
  - cmd: conda config --append channels conda-forge
  - cmd: conda update conda
  - cmd: conda update -q --all
  - ps: (get-content test-environment.yaml) | %{$_ -replace "\$\{PYTHON\}","3.5"} | set-content test-environment.yaml
  - cmd: conda env create -qf test-environment.yaml
  - cmd: git checkout -- test-environment.yaml
  - ps: (get-content test-environment.yaml) | %{$_ -replace "\$\{PYTHON\}","3.6"} | set-content test-environment.yaml
  - cmd: conda env create -qf test-environment.yaml
  - cmd: conda info -a
  - ps: Write-Host "Packages in py3.5 Environment:"
  - cmd: conda list -n py3.5
  - ps: Write-Host "Packages in py3.6 Environment:"
  - cmd: conda list -n py3.6

build_script:
  - cmd: call %PYTHON_LOC%\Scripts\activate.bat py3.5
  - cmd: pytest -vv --cov=./ --cov-append
  - cmd: call %PYTHON_LOC%\Scripts\activate.bat py3.6
  - cmd: pytest -vv --cov=./ --cov-append
  - cmd: codecov -X gcov

Update conda first to try to fix dependency issues
Update conda first to try to fix dependency issues

The most recent version of conda was not being installed, leading to no
installing the newest version of other packages
