2019-04-15 09:24:09 +00:00
|
|
|
image:
|
|
|
|
- Visual Studio 2017
|
|
|
|
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- mongodb
|
|
|
|
- postgresql
|
|
|
|
|
|
|
|
environment:
|
2019-04-15 09:45:47 +00:00
|
|
|
PATH: C:\Python37-x64;C:\Python37-x64\Scripts;C:\Program Files\PostgreSQL\9.6\bin\;%PATH%
|
2019-04-15 09:24:09 +00:00
|
|
|
VNPY_TEST_MYSQL_USER: root
|
|
|
|
VNPY_TEST_MYSQL_PASSWORD: Password12!
|
|
|
|
VNPY_TEST_POSTGRESQL_USER: postgres
|
|
|
|
VNPY_TEST_POSTGRESQL_PASSWORD: Password12!
|
2019-04-15 09:45:47 +00:00
|
|
|
MYSQL_PWD: Password12!
|
2019-04-15 09:24:09 +00:00
|
|
|
|
|
|
|
before_build:
|
|
|
|
- psql -d postgresql://%VNPY_TEST_POSTGRESQL_USER%:%VNPY_TEST_POSTGRESQL_PASSWORD%@localhost -c "create database vnpy;"
|
2019-04-15 09:45:47 +00:00
|
|
|
- ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $VNPY_TEST_MYSQL_USER " -e 'CREATE DATABASE vnpy;'
|
2019-04-15 09:24:09 +00:00
|
|
|
- python -m pip install --upgrade pip wheel setuptools
|
|
|
|
|
|
|
|
install:
|
|
|
|
- pip install psycopg2 mongoengine pymysql # we should support all database in test environment
|
|
|
|
- pip install https://pip.vnpy.com/colletion/TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl
|
|
|
|
- pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
|
|
|
- pip install -r requirements.txt
|
|
|
|
- pip install .
|
|
|
|
|
|
|
|
test_script:
|
|
|
|
- cd tests; source travis_env.sh;
|
|
|
|
- python test_all.py
|
|
|
|
|