From 41534abdbc6641f63988de4798cbd0211cf7ba09 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 05:24:09 -0400 Subject: [PATCH 01/16] appveyor --- .travis.yml | 146 --------------------------------------------------- appveyor.yml | 37 +++++++++++++ 2 files changed, 37 insertions(+), 146 deletions(-) delete mode 100644 .travis.yml create mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2620d6c6..00000000 --- a/.travis.yml +++ /dev/null @@ -1,146 +0,0 @@ -language: python - -dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069) - -python: - - "3.7" - -services: - - mongodb - - mysql - - postgresql - -before_script: - - psql -d postgresql://postgres:${VNPY_TEST_POSTGRESQL_PASSWORD}@localhost -c "create database vnpy;" - - mysql -u root --password=${VNPY_TEST_MYSQL_PASSWORD} -e 'CREATE DATABASE vnpy;' - -script: - - pip install psycopg2 mongoengine pymysql # we should support all database in test environment - - cd tests; source travis_env.sh; - - python test_all.py - -matrix: - include: - - name: "code quality analysis: flake8" - before_install: - - pip install flake8 - install: - - "" # prevent running "pip install -r requirements.txt" - script: - - flake8 - - - name: "pip install under Windows" - os: "windows" - services: [] # service is unavailable under windows - # language : cpp is necessary for windows - language: "cpp" - env: - - PATH="/c/Python37:/c/Python37/Scripts:/c/tools/mysql/current/bin:/c/Program Files/PostgreSQL/10/bin:$PATH" - before_install: - - choco install -yf mysql mongodb - # I don't know how enable a "trust" auth method in choco installed psql - - choco install -yf postgresql10 --params '/Password:1234' - - export VNPY_TEST_POSTGRESQL_PASSWORD=1234 - - choco install -yf python3 --version 3.7.2 - install: - - python -m pip install --upgrade pip wheel setuptools - - 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 . - - - name: "pip install under Ubuntu: gcc-8" - before_install: - # C++17 - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -y - install: - # C++17 - - sudo apt-get install -y gcc-8 g++-8 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 - - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 90 - - sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90 - # update pip & setuptools - - python -m pip install --upgrade pip wheel setuptools - # Linux install script - - pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl - - bash ./install.sh - - - name: "pip install under Ubuntu: gcc-7" - before_install: - # C++17 - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -y - install: - # C++17 - - sudo apt-get install -y gcc-7 g++-7 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90 - - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-7 90 - - sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-7 90 - # update pip & setuptools - - python -m pip install --upgrade pip wheel setuptools - # Linux install script - - pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl - - bash ./install.sh - - - name: "pip install under osx" - os: osx - language: shell # osx supports only shell - services: [] - before_install: [] - install: - - pip3 install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl - - bash ./install_osx.sh - before_script: [] - script: - - pip3 install psycopg2 mongoengine pymysql # we should support all database in test environment - - cd tests; source travis_env.sh; - # osx is complicated for me, skip the tests - # python3 test_all.py - - - name: "sdist install under Windows" - os: "windows" - services: [] # service is unavailable under windows - # language : cpp is necessary for windows - language: "cpp" - env: - - PATH="/c/Python37:/c/Python37/Scripts:/c/tools/mysql/current/bin:/c/Program Files/PostgreSQL/10/bin:$PATH" - before_install: - - choco install -yf mysql mongodb - # I don't know how enable a "trust" auth method in choco installed psql - - choco install -yf postgresql10 --params '/Password:1234' - - export VNPY_TEST_POSTGRESQL_PASSWORD=1234 - - choco install -yf python3 --version 3.7.2 - install: - - python -m pip install --upgrade pip wheel setuptools - - python setup.py sdist - - 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 dist/`ls dist` - - - name: "sdist install under Ubuntu: gcc-8" - before_install: - # C++17 - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -y - install: - # C++17 - - sudo apt-get install -y gcc-8 g++-8 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 - - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 90 - - sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90 - # Linux install script - - python -m pip install --upgrade pip wheel setuptools - - pushd /tmp - - wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz - - tar -xf ta-lib-0.4.0-src.tar.gz - - cd ta-lib - - ./configure --prefix=/usr - - make - - sudo make install - - popd - - pip install numpy - - pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl - - python setup.py sdist - - pip install dist/`ls dist` - diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..1e418c04 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,37 @@ +image: + - Visual Studio 2017 + - Ubuntu1804 + +services: + - mysql + - mongodb + - postgresql + +environment: + PATH: C:\Python37-x64;C:\Python37-x64\Scripts;C:\Program Files\PostgreSQL\9.6\bin\;C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql;%PATH% + VNPY_TEST_MYSQL_USER: root + VNPY_TEST_MYSQL_PASSWORD: Password12! + VNPY_TEST_POSTGRESQL_USER: postgres + VNPY_TEST_POSTGRESQL_PASSWORD: Password12! + + matrix: + - aaafb: a + - bbb: fa + +before_build: + - psql -d postgresql://%VNPY_TEST_POSTGRESQL_USER%:%VNPY_TEST_POSTGRESQL_PASSWORD%@localhost -c "create database vnpy;" + - mysql -u %VNPY_TEST_MYSQL_USER% --password=%VNPY_TEST_MYSQL_PASSWORD% -e 'CREATE DATABASE vnpy;' + - 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 + From 872244edbcec1062b506ed70166fa9702886f5af Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 05:33:08 -0400 Subject: [PATCH 02/16] [Del] remove Ubuntu1804 --- appveyor.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1e418c04..c6b64f30 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,5 @@ image: - Visual Studio 2017 - - Ubuntu1804 services: - mysql @@ -14,16 +13,14 @@ environment: VNPY_TEST_POSTGRESQL_USER: postgres VNPY_TEST_POSTGRESQL_PASSWORD: Password12! - matrix: - - aaafb: a - - bbb: fa - before_build: - psql -d postgresql://%VNPY_TEST_POSTGRESQL_USER%:%VNPY_TEST_POSTGRESQL_PASSWORD%@localhost -c "create database vnpy;" - - mysql -u %VNPY_TEST_MYSQL_USER% --password=%VNPY_TEST_MYSQL_PASSWORD% -e 'CREATE DATABASE vnpy;' + - ls "C:\Program Files" + - ls "C:\Program Files\MySQL\" + - ps: ls -Rec "C:\Program Files\MySQL\" + - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u %VNPY_TEST_MYSQL_USER% --password=%VNPY_TEST_MYSQL_PASSWORD% -e 'CREATE DATABASE vnpy;' - 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 From ccb57bcf9ab5063b0c1ffad5c2b5f77fe2d31286 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 05:41:16 -0400 Subject: [PATCH 03/16] use ps --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c6b64f30..e021ae93 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,8 +15,6 @@ environment: before_build: - psql -d postgresql://%VNPY_TEST_POSTGRESQL_USER%:%VNPY_TEST_POSTGRESQL_PASSWORD%@localhost -c "create database vnpy;" - - ls "C:\Program Files" - - ls "C:\Program Files\MySQL\" - ps: ls -Rec "C:\Program Files\MySQL\" - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u %VNPY_TEST_MYSQL_USER% --password=%VNPY_TEST_MYSQL_PASSWORD% -e 'CREATE DATABASE vnpy;' - python -m pip install --upgrade pip wheel setuptools From b54652cd79e07db54cd7bdd642196698e08bcd17 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 05:45:47 -0400 Subject: [PATCH 04/16] [Mod] ps var --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e021ae93..2347c2c5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,16 +7,16 @@ services: - postgresql environment: - PATH: C:\Python37-x64;C:\Python37-x64\Scripts;C:\Program Files\PostgreSQL\9.6\bin\;C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql;%PATH% + PATH: C:\Python37-x64;C:\Python37-x64\Scripts;C:\Program Files\PostgreSQL\9.6\bin\;%PATH% VNPY_TEST_MYSQL_USER: root VNPY_TEST_MYSQL_PASSWORD: Password12! VNPY_TEST_POSTGRESQL_USER: postgres VNPY_TEST_POSTGRESQL_PASSWORD: Password12! + MYSQL_PWD: Password12! before_build: - psql -d postgresql://%VNPY_TEST_POSTGRESQL_USER%:%VNPY_TEST_POSTGRESQL_PASSWORD%@localhost -c "create database vnpy;" - - ps: ls -Rec "C:\Program Files\MySQL\" - - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u %VNPY_TEST_MYSQL_USER% --password=%VNPY_TEST_MYSQL_PASSWORD% -e 'CREATE DATABASE vnpy;' + - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $VNPY_TEST_MYSQL_USER " -e 'CREATE DATABASE vnpy;' - python -m pip install --upgrade pip wheel setuptools install: From 807e8ab69b089032102f3c962c125e887b584831 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 05:53:56 -0400 Subject: [PATCH 05/16] all ps --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2347c2c5..4c2f9385 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,5 @@ +clone_depth: 1 + image: - Visual Studio 2017 @@ -15,8 +17,8 @@ environment: MYSQL_PWD: Password12! before_build: - - psql -d postgresql://%VNPY_TEST_POSTGRESQL_USER%:%VNPY_TEST_POSTGRESQL_PASSWORD%@localhost -c "create database vnpy;" - - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $VNPY_TEST_MYSQL_USER " -e 'CREATE DATABASE vnpy;' + - ps: psql -d "postgresql://$VNPY_TEST_POSTGRESQL_USER:$VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" + - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' - python -m pip install --upgrade pip wheel setuptools install: From 7e6207efb8f27d9000d2cc5c4ff5bd7a722ac433 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 05:59:34 -0400 Subject: [PATCH 06/16] [Add] env prefix --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4c2f9385..2a09eb10 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,8 +17,8 @@ environment: MYSQL_PWD: Password12! before_build: - - ps: psql -d "postgresql://$VNPY_TEST_POSTGRESQL_USER:$VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" - - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' + - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" + - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' - python -m pip install --upgrade pip wheel setuptools install: From c4b29254c5363b198f674860aee8dfa0c8fab7c5 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:03:07 -0400 Subject: [PATCH 07/16] [Mod] new sequence --- appveyor.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2a09eb10..61df6ea2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,18 +16,20 @@ environment: VNPY_TEST_POSTGRESQL_PASSWORD: Password12! MYSQL_PWD: Password12! -before_build: - - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" - - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' +install: - python -m pip install --upgrade pip wheel setuptools -install: +build_script: - 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 . +before_test: + - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" + - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' + test_script: - cd tests; source travis_env.sh; - python test_all.py From 4ae728288323f7176d607416a4af3e5f0c697796 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:05:20 -0400 Subject: [PATCH 08/16] echo --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 61df6ea2..14f12227 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,6 +27,7 @@ build_script: - pip install . before_test: + - ps: echo psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' From b06868509283aa4d57319149352a1dfc4e8dd394 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:10:29 -0400 Subject: [PATCH 09/16] mod seq --- appveyor.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 14f12227..5511872e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,8 @@ environment: MYSQL_PWD: Password12! install: + - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" + - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' - python -m pip install --upgrade pip wheel setuptools build_script: @@ -26,11 +28,6 @@ build_script: - pip install -r requirements.txt - pip install . -before_test: - - ps: echo psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" - - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" - - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' - test_script: - cd tests; source travis_env.sh; - python test_all.py From 46b5c89f85321f232f14161898bc54a1e32c17dc Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:11:28 -0400 Subject: [PATCH 10/16] [Mod] new seq --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 5511872e..b67258e2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,9 +17,10 @@ environment: MYSQL_PWD: Password12! install: + - python -m pip install --upgrade pip wheel setuptools +before_build: - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' - - python -m pip install --upgrade pip wheel setuptools build_script: - pip install psycopg2 mongoengine pymysql # we should support all database in test environment From a5c0dbcaa18885f238ad763b47b13694c396d8b7 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:14:27 -0400 Subject: [PATCH 11/16] [Mod] added{} --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b67258e2..f864c5a9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,7 +19,7 @@ environment: install: - python -m pip install --upgrade pip wheel setuptools before_build: - - ps: psql -d "postgresql://$ENV:VNPY_TEST_POSTGRESQL_USER:$ENV:VNPY_TEST_POSTGRESQL_PASSWORD@localhost" -c "create database vnpy;" + - ps: psql -d "postgresql://${ENV:VNPY_TEST_POSTGRESQL_USER}:${ENV:VNPY_TEST_POSTGRESQL_PASSWORD}@localhost" -c "create database vnpy;" - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' build_script: From d3167a8bdf49730341fe119d8d11dd054a8b6b1c Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:24:29 -0400 Subject: [PATCH 12/16] [Add] sdist build --- appveyor.yml | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f864c5a9..d3194b9c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,9 @@ clone_depth: 1 +configuration: + - pip + - sdist + image: - Visual Studio 2017 @@ -10,26 +14,58 @@ services: environment: PATH: C:\Python37-x64;C:\Python37-x64\Scripts;C:\Program Files\PostgreSQL\9.6\bin\;%PATH% + VNPY_TEST_MYSQL_DATABASE: vnpy + VNPY_TEST_MYSQL_HOST: localhost + VNPY_TEST_MYSQL_PORT: 3306 VNPY_TEST_MYSQL_USER: root VNPY_TEST_MYSQL_PASSWORD: Password12! + + VNPY_TEST_POSTGRESQL_DATABASE: + VNPY_TEST_POSTGRESQL_HOST: localhost + VNPY_TEST_POSTGRESQL_PORT: 5432 VNPY_TEST_POSTGRESQL_USER: postgres VNPY_TEST_POSTGRESQL_PASSWORD: Password12! + + VNPY_TEST_MONGODB_DATABASE: vnpy + VNPY_TEST_MONGODB_HOST: localhost + VNPY_TEST_MONGODB_PORT: 27017 + MYSQL_PWD: Password12! + matrix: + - BUILD: pip + - BUILD: sdist + install: - python -m pip install --upgrade pip wheel setuptools before_build: - ps: psql -d "postgresql://${ENV:VNPY_TEST_POSTGRESQL_USER}:${ENV:VNPY_TEST_POSTGRESQL_PASSWORD}@localhost" -c "create database vnpy;" - ps: . "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u $ENV:VNPY_TEST_MYSQL_USER -e 'CREATE DATABASE vnpy;' -build_script: - - 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 . +for: + - matrix: + only: + configuration: + pip + build_script: + - 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 . + + - matrix: + only: + configuration: + sdist + build_script: + - python setup.py sdist + - 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 dist/`ls dist` test_script: - - cd tests; source travis_env.sh; + - cd tests; - python test_all.py From 6d6a592dd379aabf2a7fbccd316ca46000ed210c Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:25:14 -0400 Subject: [PATCH 13/16] [Fix] fix only --- appveyor.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d3194b9c..d38d1915 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,8 +45,7 @@ before_build: for: - matrix: only: - configuration: - pip + - configuration: pip build_script: - 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 @@ -56,8 +55,7 @@ for: - matrix: only: - configuration: - sdist + - configuration: sdist build_script: - python setup.py sdist - pip install psycopg2 mongoengine pymysql # we should support all database in test environment From b782e18a0e20b21db972cab6369c6b33e081ab3c Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:26:24 -0400 Subject: [PATCH 14/16] [Del] remove matrix in env --- appveyor.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d38d1915..1ee8bc46 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,10 +32,6 @@ environment: MYSQL_PWD: Password12! - matrix: - - BUILD: pip - - BUILD: sdist - install: - python -m pip install --upgrade pip wheel setuptools before_build: From 100aa8d41744baec327d1bceab417a9becad69d4 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:30:13 -0400 Subject: [PATCH 15/16] [Mod] use ps --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1ee8bc46..e2f73236 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -60,6 +60,5 @@ for: - pip install dist/`ls dist` test_script: - - cd tests; - - python test_all.py + - ps: cd tests; python test_all.py From 5b9b081a63e032b24c722306ddc4559c7e363ee2 Mon Sep 17 00:00:00 2001 From: nanoric Date: Mon, 15 Apr 2019 06:35:22 -0400 Subject: [PATCH 16/16] [Mod] added missed key --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e2f73236..842a1ab0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ environment: VNPY_TEST_MYSQL_USER: root VNPY_TEST_MYSQL_PASSWORD: Password12! - VNPY_TEST_POSTGRESQL_DATABASE: + VNPY_TEST_POSTGRESQL_DATABASE: vnpy VNPY_TEST_POSTGRESQL_HOST: localhost VNPY_TEST_POSTGRESQL_PORT: 5432 VNPY_TEST_POSTGRESQL_USER: postgres