@@ -4,44 +4,56 @@ environment:
44 # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
55 # /E:ON and /V:ON options are not enabled in the batch script intepreter
66 # See: http://stackoverflow.com/a/13751649/163740
7- CMD_IN_ENV : " cmd /E:ON /V:ON /C .\\ appveyor\\ run_with_env.cmd"
7+ PYTHON : " C:\\ conda"
8+ MINICONDA_VERSION : " latest"
9+ # CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
10+ CMD_IN_ENV : " cmd /E:ON /V:ON /C .\\ ci-helpers/appveyor/windows_sdk.cmd"
11+ CONDA_DEPENDENCIES : " scipy pandas seaborn sqlalchemy pymysql shapely"
12+ PIP_DEPENDENCIES : " pyodbc,pytest,psycopg2,-e git+https://github.com/ODM2/geoalchemy.git@v0.7.4#egg=geoalchemy-0.7.4"
13+
14+
15+
16+
17+
818 # postgres
919 POSTGRES_PORT : tcp://localhost:5432
1020 POSTGRES_ENV_POSTGRES_USER : postgres
1121 POSTGRES_ENV_POSTGRES_PASSWORD : Password12!
1222 POSTGRES_ENV_POSTGRES_DB : odm2
13- POSTGRES_PATH : C:\Program Files\PostgreSQL\9.4
23+ POSTGRES_PATH : C:\Program Files\PostgreSQL\9.4\bin
1424 PGUSER : postgres
1525 PGPASSWORD : Password12!
1626 # mysql
1727 MYSQL_PORT : tcp://localhost:3306
1828 MYSQL_ENV_MYSQL_USER : root
1929 MYSQL_ENV_MYSQL_PASSWORD : Password12!
2030 MYSQL_ENV_MYSQL_DATABASE : odm2
21- MYSQL_PATH : C:\Program Files\MySql\MySQL Server 5.6
31+ MYSQL_PATH : C:\Program Files\MySql\MySQL Server 5.6\bin
2232 MYSQL_PWD : Password12!
2333 # sql server
2434 SQLSERVER_ENV_SQLSERVER_HOST : localhost
2535 SQLSERVER_ENV_SQLSERVER_PORT : 1433
2636 SQLSERVER_ENV_SQLSERVER_USER : sa
2737 SQLSERVER_ENV_SQLSERVER_PASSWORD : Password12!
2838 SQLSERVER_ENV_SQLSERVER_DATABASE : odm2
29- matrix :
39+
3040
3141
3242 # Pre-installed Python versions, which Appveyor may upgrade to
3343 # a later point release.
3444 # See: http://www.appveyor.com/docs/installed-software#python
3545
46+ matrix :
47+ - PYTHON : " C:\\ Python27-conda32"
48+ PYTHON_VERSION : " 2.7"
49+ PYTHON_ARCH : " 32"
50+
3651
37- matrix :
38- - PYTHON : " C: \\ Python27-conda32 "
39- PYTHON_VERSION : " 2.7 "
40- PYTHON_ARCH : " 32 "
52+ - PYTHON : " C: \\ Python27-conda64 "
53+ PYTHON_VERSION : " 2.7 "
54+ PYTHON_ARCH : " 64 "
55+ NUMPY_VERSION : " stable "
4156
42- - PYTHON : " C:\\ Python34-conda64"
43- PYTHON_VERSION : " 3.4"
44- PYTHON_ARCH : " 64"
4557
4658services :
4759 - mssql2008r2sp2
@@ -66,106 +78,216 @@ install:
6678
6779 # Install Python (from the official .msi of http://python.org) and pip when
6880 # not already installed.
69- - ps : if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
81+ # - ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
82+ - ps : ci-helpers/appveyor/install-miniconda.ps1
83+
7084
7185 # Prepend newly installed Python to the PATH of this build (this cannot be
7286 # done from inside the powershell script as it would require to restart
7387 # the parent CMD process).
7488 - " SET PATH=%PYTHON%;%PYTHON%\\ Scripts;%PATH%"
7589 # add databases
7690 - " SET PATH=%POSTGRES_PATH%\b in;%MYSQL_PATH%\b in;%PATH%"
91+ - " activate test"
7792
7893 # Check that we have the expected version and architecture for Python
7994 - " python --version"
8095 - " python -c \" import struct; print(struct.calcsize('P') * 8)\" "
8196
82- # Upgrade to the latest version of pip to avoid it displaying warnings
83- # about it being out of date.
84- - " pip install --disable-pip-version-check --user --upgrade pip"
8597
86- # Install the build dependencies of the project. If some dependencies contain
87- # compiled extensions and are not provided as pre-built wheel packages,
88- # pip will build them from source using the MSVC compiler matching the
89- # target Python version and architecture
90- - " %CMD_IN_ENV% pip install -r dev-requirements.txt"
9198
9299build_script :
93- # Build the compiled extension
94- - " %CMD_IN_ENV% python setup.py build"
95- build_script :
96- # Build the compiled extension
97- - " %CMD_IN_ENV% python setup.py build"
98- build_script :
99- # postgres
100- - createdb odm2
101- - psql -d odm2 -a -f spec/databases/postgresql/schema/schema.sql
102- # mysql
103- - mysql -e "drop database test; create database odm2;" --user=root
104- - mysql sqlectron < spec/databases/mysql/schema/schema.sql --user=root
100+ # #https://github.com/sqlectron/sqlectron-core/blob/master/appveyor.yml
101+
105102 # sqlserver
106- - ps : ./appveyor- sqlserver.ps1 SQL2008R2SP2
103+ - ps : ci-helpers\appveyor\ sqlserver.ps1 SQL2008R2SP2
107104 - sqlcmd -S localhost,1433 -U sa -P Password12! -Q "CREATE DATABASE odm2" -d "master"
108- - sqlcmd -S localhost,1433 -U sa -P Password12! -i spec/databases/sqlserver/schema/schema .sql -d "odm2"
105+ - sqlcmd -S localhost,1433 -U sa -P Password12! -i tests/usecasesql/littlebearriver/sampledatabases/odm2_ms_sql_server/LBR_ODM2_MSSQLDump .sql -d "odm2"
109106 - sqlcmd -S localhost,1433 -U sa -P Password12! -Q "select table_name from information_schema.tables" -d "odm2"
107+ # postgres
108+ - psql createdb odm2
109+ - psql -d odm2 -a -f tests/usecasesql/marchantariats/marchantariats.sql
110+ # mysql
111+ - mysql -e "drop database test; create database odm2;" --user=root
112+ - mysql odm2 < tests/usecasesql/littlebearriver/sampledatabases/odm2_mysql/LBR_MySQL_SmallExample.sql --user=root
110113
111114test_script :
112115 # Run the project tests
113- - " %CMD_IN_ENV% python setup.py nosetests"
114-
115- language : python
116- python :
117- # - "2.6"
118- - " 2.7"
119- # - "3.2"
120- # - "3.3"
121- # - "3.4"
122- # - "3.5"
123- # - "3.5-dev" # 3.5 development branch
124- # - "nightly" # currently points to 3.6-dev
125- # command to install dependencies
126-
127- before_install :
128- # https://github.com/sqlectron/sqlectron-core/blob/master/appveyor.yml
129- - mysql -e "CREATE USER 'ODM'@'localhost' IDENTIFIED BY 'odm';GRANT ALL PRIVILEGES ON *.* TO 'ODM'@'localhost';" -uroot
130- - mysql -e "create database IF NOT EXISTS odm2;" -uroot
131- - mysql -e "create database IF NOT EXISTS odm2test;" -uroot
132- - psql -U postgres -c "create extension postgis"
133- - psql -c 'DROP DATABASE IF EXISTS odm2test;' -U postgres;
134- - psql -c 'create database odm2test;' -U postgres;
135- # - psql -U postgres -d odm2test -a -f ./tests/schemas/postgresql/ODM2_for_PostgreSQL.sql
136- - psql -c 'DROP DATABASE IF EXISTS odm2;' -U postgres;
137- - psql -c 'create database odm2;' -U postgres;
138- # patterned after: https://github.com/ptrv/gpx2spatialite/blob/master/.travis.yml
139- # - sudo apt-get install -y python-software-properties
140- # - sudo apt-add-repository -y ppa:git-core/ppa
141- # - sudo apt-add-repository -y ppa:ubuntugis/ppa
142- # - sudo apt-get update -qq
143- # - sudo apt-get install unixodbc unixodbc-dev tdsodbc
144- # - sudo apt-get install freetds-dev freetds-bin
145- # - sudo apt-get install libc6 e2fsprogs # mssql driver
146- # Spatialiate
147- # - sudo apt-get install -y libproj-dev libgeos-dev libspatialite-dev
148- # - sudo ln -s /usr/lib/x86_64-linux-gnu/libspatialite.so /usr/lib/libspatialite.so
149- # - sudo apt-get install python-scipy python-matplotlib python-pandas python-sympy python-nose
150- # - sudo apt-get install python-matplotlib python-pandas python-nose
151- - pip install pandas
152- install : # now just our code
153- - pip install git+https://github.com/ODM2/geoalchemy.git@odm2#egg=geoalchemy-0.7.3
154- - pip install .
155- - pip install -r requirements_tests.txt --allow-external pyodbc --allow-unverified pyodbc
156- # pysqlite
157- - pip install pysqlite
158- - dir .\tests\usecasesql\littlebearriver\sampledatabases\odm2_mysql\LBR_MySQL_SmallExample.sql .\tests\usecasesql\marchantariats\marchantariats.sql
159- - mysql --user root --verbose odm2 < .\tests\usecasesql\littlebearriver\sampledatabases\odm2_mysql\LBR_MySQL_SmallExample.sql
160- # add -a to psql to see full log
161- - psql -U postgres -f ./tests/usecasesql/marchantariats/marchantariats.sql
162-
163- # don't forget to open up the azure mssql server to these addreses
164- # https://docs.travis-ci.com/user/ip-addresses/
165-
166- # command to run tests
167- script :
168- # just the connection part
169- - py.test tests/test_connection.py
170- - py.test
116+ - " py.test"
117+
118+
119+
120+
121+
171122
123+ # environment:
124+ # # patterned after: https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
125+ # global:
126+ # # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
127+ # # /E:ON and /V:ON options are not enabled in the batch script intepreter
128+ # # See: http://stackoverflow.com/a/13751649/163740
129+ # CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
130+ # # postgres
131+ # POSTGRES_PORT: tcp://localhost:5432
132+ # POSTGRES_ENV_POSTGRES_USER: postgres
133+ # POSTGRES_ENV_POSTGRES_PASSWORD: Password12!
134+ # POSTGRES_ENV_POSTGRES_DB: odm2
135+ # POSTGRES_PATH: C:\Program Files\PostgreSQL\9.4
136+ # PGUSER: postgres
137+ # PGPASSWORD: Password12!
138+ # # mysql
139+ # MYSQL_PORT: tcp://localhost:3306
140+ # MYSQL_ENV_MYSQL_USER: root
141+ # MYSQL_ENV_MYSQL_PASSWORD: Password12!
142+ # MYSQL_ENV_MYSQL_DATABASE: odm2
143+ # MYSQL_PATH: C:\Program Files\MySql\MySQL Server 5.6
144+ # MYSQL_PWD: Password12!
145+ # # sql server
146+ # SQLSERVER_ENV_SQLSERVER_HOST: localhost
147+ # SQLSERVER_ENV_SQLSERVER_PORT: 1433
148+ # SQLSERVER_ENV_SQLSERVER_USER: sa
149+ # SQLSERVER_ENV_SQLSERVER_PASSWORD: Password12!
150+ # SQLSERVER_ENV_SQLSERVER_DATABASE: odm2
151+ # matrix:
152+ #
153+ #
154+ # # Pre-installed Python versions, which Appveyor may upgrade to
155+ # # a later point release.
156+ # # See: http://www.appveyor.com/docs/installed-software#python
157+ #
158+ #
159+ # matrix:
160+ # - PYTHON: "C:\\Python27-conda32"
161+ # PYTHON_VERSION: "2.7"
162+ # PYTHON_ARCH: "32"
163+ #
164+ # - PYTHON: "C:\\Python34-conda64"
165+ # PYTHON_VERSION: "3.4"
166+ # PYTHON_ARCH: "64"
167+ #
168+ # services:
169+ # - mssql2008r2sp2
170+ # - mysql
171+ # - postgresql
172+ #
173+ # install:
174+ # # If there is a newer build queued for the same PR, cancel this one.
175+ # # The AppVeyor 'rollout builds' option is supposed to serve the same
176+ # # purpose but it is problematic because it tends to cancel builds pushed
177+ # # directly to master instead of just PR builds (or the converse).
178+ # # credits: JuliaLang developers.
179+ # - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
180+ # https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
181+ # Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
182+ # throw "There are newer queued builds for this pull request, failing early." }
183+ # - ECHO "Filesystem root:"
184+ # - ps: "ls \"C:/\""
185+ #
186+ # - ECHO "Installed SDKs:"
187+ # - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
188+ #
189+ # # Install Python (from the official .msi of http://python.org) and pip when
190+ # # not already installed.
191+ # - ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
192+ #
193+ # # Prepend newly installed Python to the PATH of this build (this cannot be
194+ # # done from inside the powershell script as it would require to restart
195+ # # the parent CMD process).
196+ # - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
197+ # # add databases
198+ # - "SET PATH=%POSTGRES_PATH%\bin;%MYSQL_PATH%\bin;%PATH%"
199+ #
200+ # # Check that we have the expected version and architecture for Python
201+ # - "python --version"
202+ # - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
203+ #
204+ # # Upgrade to the latest version of pip to avoid it displaying warnings
205+ # # about it being out of date.
206+ # - "pip install --disable-pip-version-check --user --upgrade pip"
207+ #
208+ # # Install the build dependencies of the project. If some dependencies contain
209+ # # compiled extensions and are not provided as pre-built wheel packages,
210+ # # pip will build them from source using the MSVC compiler matching the
211+ # # target Python version and architecture
212+ # - "%CMD_IN_ENV% pip install -r dev-requirements.txt"
213+ #
214+ # build_script:
215+ # # Build the compiled extension
216+ # - "%CMD_IN_ENV% python setup.py build"
217+ # build_script:
218+ # # Build the compiled extension
219+ # - "%CMD_IN_ENV% python setup.py build"
220+ # build_script:
221+ # # postgres
222+ # - createdb odm2
223+ # - psql -d odm2 -a -f spec/databases/postgresql/schema/schema.sql
224+ # # mysql
225+ # - mysql -e "drop database test; create database odm2;" --user=root
226+ # - mysql sqlectron < spec/databases/mysql/schema/schema.sql --user=root
227+ # # sqlserver
228+ # - ps: ./appveyor-sqlserver.ps1 SQL2008R2SP2
229+ # - sqlcmd -S localhost,1433 -U sa -P Password12! -Q "CREATE DATABASE odm2" -d "master"
230+ # - sqlcmd -S localhost,1433 -U sa -P Password12! -i spec/databases/sqlserver/schema/schema.sql -d "odm2"
231+ # - sqlcmd -S localhost,1433 -U sa -P Password12! -Q "select table_name from information_schema.tables" -d "odm2"
232+ #
233+ # test_script:
234+ # # Run the project tests
235+ # - "%CMD_IN_ENV% python setup.py nosetests"
236+ #
237+ # language: python
238+ # python:
239+ # # - "2.6"
240+ # - "2.7"
241+ # # - "3.2"
242+ # # - "3.3"
243+ # # - "3.4"
244+ # # - "3.5"
245+ # # - "3.5-dev" # 3.5 development branch
246+ # # - "nightly" # currently points to 3.6-dev
247+ # # command to install dependencies
248+ #
249+ # before_install:
250+ # #https://github.com/sqlectron/sqlectron-core/blob/master/appveyor.yml
251+ # - mysql -e "CREATE USER 'ODM'@'localhost' IDENTIFIED BY 'odm';GRANT ALL PRIVILEGES ON *.* TO 'ODM'@'localhost';" -uroot
252+ # - mysql -e "create database IF NOT EXISTS odm2;" -uroot
253+ # - mysql -e "create database IF NOT EXISTS odm2test;" -uroot
254+ # - psql -U postgres -c "create extension postgis"
255+ # - psql -c 'DROP DATABASE IF EXISTS odm2test;' -U postgres;
256+ # - psql -c 'create database odm2test;' -U postgres;
257+ # # - psql -U postgres -d odm2test -a -f ./tests/schemas/postgresql/ODM2_for_PostgreSQL.sql
258+ # - psql -c 'DROP DATABASE IF EXISTS odm2;' -U postgres;
259+ # - psql -c 'create database odm2;' -U postgres;
260+ # # patterned after: https://github.com/ptrv/gpx2spatialite/blob/master/.travis.yml
261+ # # - sudo apt-get install -y python-software-properties
262+ # # - sudo apt-add-repository -y ppa:git-core/ppa
263+ # # - sudo apt-add-repository -y ppa:ubuntugis/ppa
264+ # # - sudo apt-get update -qq
265+ # # - sudo apt-get install unixodbc unixodbc-dev tdsodbc
266+ # # - sudo apt-get install freetds-dev freetds-bin
267+ # # - sudo apt-get install libc6 e2fsprogs # mssql driver
268+ # # Spatialiate
269+ # # - sudo apt-get install -y libproj-dev libgeos-dev libspatialite-dev
270+ # # - sudo ln -s /usr/lib/x86_64-linux-gnu/libspatialite.so /usr/lib/libspatialite.so
271+ # # - sudo apt-get install python-scipy python-matplotlib python-pandas python-sympy python-nose
272+ # # - sudo apt-get install python-matplotlib python-pandas python-nose
273+ # - pip install pandas
274+ # install: # now just our code
275+ # - pip install git+https://github.com/ODM2/geoalchemy.git@odm2#egg=geoalchemy-0.7.3
276+ # - pip install .
277+ # - pip install -r requirements_tests.txt --allow-external pyodbc --allow-unverified pyodbc
278+ # # pysqlite
279+ # - pip install pysqlite
280+ # - dir .\tests\usecasesql\littlebearriver\sampledatabases\odm2_mysql\LBR_MySQL_SmallExample.sql .\tests\usecasesql\marchantariats\marchantariats.sql
281+ # - mysql --user root --verbose odm2 < .\tests\usecasesql\littlebearriver\sampledatabases\odm2_mysql\LBR_MySQL_SmallExample.sql
282+ # # add -a to psql to see full log
283+ # - psql -U postgres -f ./tests/usecasesql/marchantariats/marchantariats.sql
284+ #
285+ # # don't forget to open up the azure mssql server to these addreses
286+ # # https://docs.travis-ci.com/user/ip-addresses/
287+ #
288+ # # command to run tests
289+ # script:
290+ # # just the connection part
291+ # - py.test tests/test_connection.py
292+ # - py.test
293+ #
0 commit comments