From 18164192eb72e921d5d1a3f9b7c58940366a4a98 Mon Sep 17 00:00:00 2001
From: jlaura <jlaura@usgs.gov>
Date: Fri, 14 Jun 2019 10:17:18 -0700
Subject: [PATCH] Appveyor (#115)

* Fixes failing tests

* removes python 3.5 support

* Skips conda upload if a PR

* updates appveyor

* ncurses issues; maybe install order?

* Testing removing packages win is struggling with

* Readds build phase

* fixes apvpeyor test phase

* tests passing, now conda build

* Removes push to conda

* Removes x86 support - pytest issues

* Removes print
---
 appveyor.yml    | 43 ++++++++++++-------------------------------
 environment.yml |  2 --
 2 files changed, 12 insertions(+), 33 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 8fadf13..451c3b9 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,50 +2,30 @@ branches:
   only:
   - master
 
-version: '0.1.0.{build}'
+version: 1.2.0.{build}'
 
 platform:
   - x64
-  - x86
 
 environment:
   matrix:
-    - PYTHON: "C:\\Miniconda35-x64\\Scripts\\activate.bat"
-      PYTHON_VERSION: 3.5
     - PYTHON: "C:\\Miniconda36-x64\\Scripts\\activate.bat"
       PYTHON_VERSION: 3.6
-    - PYTHON: "C:\\Miniconda35\\Scripts\\activate.bat"
-      PYTHON_VERSION: 3.5
-    - PYTHON: "C:\\Miniconda36\\Scripts\\activate.bat"
-      PYTHON_VERSION: 3.6
-
-matrix:
-  exclude:
-    - PYTHON: "C:\\Miniconda35-x64\\Scripts\\activate.bat"
-      platform: x86
-    - PYTHON: "C:\\Miniconda36-x64\\Scripts\\activate.bat"
-      platform: x86
-    - PYTHON: "C:\\Miniconda35\\Scripts\\activate.bat"
-      platform: x64
-    - PYTHON: "C:\\Miniconda36\\Scripts\\activate.bat"
-      platform: x64
+    - PYTHON: "C:\\Miniconda37-x64\\Scripts\\activate.bat"
+      PYTHON_VERSION: 3.7
 
 configuration:
   - Release
 
 install:
+  - mkdir C:\Users\appveyor\.conda
   - cmd: call %PYTHON%
   - cmd: conda config --set always_yes yes --set changeps1 no
   - cmd: conda update -q conda
-  - cmd: conda install conda-build anaconda-client
-  - cmd: conda create -q -n test_env python=%PYTHON_VERSION%
-  - cmd: activate test_env
   - cmd: conda config --add channels conda-forge
-  - cmd: conda install -c conda-forge pvl protobuf gdal numpy pandas sqlalchemy pyyaml networkx affine h5py scipy pyproj
-  - cmd: conda install -c conda-forge pytest pytest-cov
-  # https://pythonhosted.org/CodeChat/appveyor.yml.html
-  - cmd: python -m pip install -U pip
-  - cmd: python -m easy_install -U setuptools
+  - cmd: conda create -q -n test python=%PYTHON_VERSION%
+  - cmd: conda env update -n test -f environment.yml
+  - cmd: activate test
 
 build_script:
   - cmd: python setup.py install
@@ -53,7 +33,8 @@ build_script:
 test_script:
   - cmd: pytest plio/
 
-on_success:
-  - cmd: deactivate
-  - cmd: conda config --set anaconda_upload yes
-  - cmd: conda build --token %CONDA_UPLOAD_TOKEN% .
+    #on_success:
+    #- cmd: conda deactivate
+    #- cmd: conda install conda-build anaconda-client
+    #- cmd: conda config --set anaconda_upload yes
+    # - cmd: conda build --token %CONDA_UPLOAD_TOKEN% .
diff --git a/environment.yml b/environment.yml
index 908f061..ffffa37 100644
--- a/environment.yml
+++ b/environment.yml
@@ -17,9 +17,7 @@ dependencies:
   - pandas 
   - sqlalchemy 
   - pyyaml 
-  - ncurses 
   - pytest 
   - pytest-cov 
-  - sh 
   - coveralls 
   - nbsphinx
-- 
GitLab