2019-01-07 06:20:39 +00:00
|
|
|
language: python
|
2019-03-19 05:41:54 +00:00
|
|
|
|
|
|
|
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
|
|
|
|
|
2019-04-15 13:06:23 +00:00
|
|
|
cache: pip
|
|
|
|
|
|
|
|
git:
|
|
|
|
depth: 1
|
|
|
|
|
2019-01-07 06:20:39 +00:00
|
|
|
python:
|
2019-03-19 05:41:54 +00:00
|
|
|
- "3.7"
|
|
|
|
|
2019-04-15 07:17:30 +00:00
|
|
|
services:
|
|
|
|
- mongodb
|
|
|
|
- mysql
|
|
|
|
- postgresql
|
|
|
|
|
2019-04-15 12:59:57 +00:00
|
|
|
before_install:
|
|
|
|
- eval "${MATRIX_EVAL}"
|
|
|
|
|
2019-04-15 07:17:30 +00:00
|
|
|
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;'
|
|
|
|
|
2019-03-27 08:21:25 +00:00
|
|
|
script:
|
2019-04-15 07:17:30 +00:00
|
|
|
- pip install psycopg2 mongoengine pymysql # we should support all database in test environment
|
|
|
|
- cd tests; source travis_env.sh;
|
|
|
|
- python test_all.py
|
2019-03-27 08:21:25 +00:00
|
|
|
|
2019-03-19 05:41:54 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
2019-03-19 10:38:24 +00:00
|
|
|
- name: "code quality analysis: flake8"
|
|
|
|
before_install:
|
|
|
|
- pip install flake8
|
|
|
|
install:
|
|
|
|
- "" # prevent running "pip install -r requirements.txt"
|
|
|
|
script:
|
|
|
|
- flake8
|
|
|
|
|
|
|
|
- name: "pip install under Ubuntu: gcc-8"
|
2019-04-15 09:57:32 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-8
|
|
|
|
env:
|
|
|
|
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
2019-03-19 05:41:54 +00:00
|
|
|
install:
|
2019-04-03 06:46:43 +00:00
|
|
|
# update pip & setuptools
|
2019-03-27 09:24:28 +00:00
|
|
|
- python -m pip install --upgrade pip wheel setuptools
|
2019-04-03 06:46:43 +00:00
|
|
|
# Linux install script
|
|
|
|
- pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
2019-03-19 05:41:54 +00:00
|
|
|
- bash ./install.sh
|
|
|
|
|
2019-03-29 06:53:28 +00:00
|
|
|
- name: "sdist install under Ubuntu: gcc-8"
|
2019-04-15 09:57:32 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-7
|
|
|
|
env:
|
|
|
|
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
2019-03-29 03:02:46 +00:00
|
|
|
install:
|
|
|
|
# Linux install script
|
|
|
|
- python -m pip install --upgrade pip wheel setuptools
|
2019-03-29 06:49:18 +00:00
|
|
|
- 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
|
2019-03-29 08:06:25 +00:00
|
|
|
- pip install numpy
|
2019-03-29 10:13:38 +00:00
|
|
|
- pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
2019-03-29 03:02:46 +00:00
|
|
|
- python setup.py sdist
|
|
|
|
- pip install dist/`ls dist`
|
2019-04-15 07:17:30 +00:00
|
|
|
|
2019-04-15 12:54:28 +00:00
|
|
|
- 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;
|
|
|
|
- VNPY_TEST_ONLY_SQLITE=1 python3 test_all.py
|