Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
94 lines (85 sloc) 4.03 KB
language: python
dist: xenial
sudo: true
addons:
postgresql: "9.6"
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9-dev"
- "nightly"
env:
global:
- ANYBLOK_DATABASE_NAME=travis_ci_test
- MARKERS=''
matrix:
- ANYBLOK_DATABASE_DRIVER=postgresql ANYBLOK_DATABASE_USER=postgres SQLSERVER='psql -c' SQLPYCLIENT='psycopg2'
- ANYBLOK_DATABASE_DRIVER=mysql ANYBLOK_DATABASE_USER=travis SQLSERVER='mysql -e' SQLPYCLIENT='mysqlclient'
- |-
ANYBLOK_DATABASE_HOST=localhost \
ANYBLOK_DATABASE_PORT=1433 \
ANYBLOK_DATABASE_DRIVER=mssql+pyodbc \
ANYBLOK_DATABASE_USER=sa \
ANYBLOK_DATABASE_PASSWORD=AnyBl@k2019 \
ANYBLOK_DATABASE_QUERY='driver=ODBC Driver 17 for SQL Server'\
SQLSERVER='docker exec mssql /opt/mssql-tools/bin/sqlcmd -U sa -P AnyBl@k2019 -Q' \
SQLPYCLIENT='pyodbc' \
MARKERS='field or column or relationship'
- |-
ANYBLOK_DATABASE_HOST=localhost \
ANYBLOK_DATABASE_PORT=1433 \
ANYBLOK_DATABASE_DRIVER=mssql+pyodbc \
ANYBLOK_DATABASE_USER=sa \
ANYBLOK_DATABASE_PASSWORD=AnyBl@k2019 \
ANYBLOK_DATABASE_QUERY='driver=ODBC Driver 17 for SQL Server'\
SQLSERVER='docker exec mssql /opt/mssql-tools/bin/sqlcmd -U sa -P AnyBl@k2019 -Q' \
SQLPYCLIENT='pyodbc' \
MARKERS='not field and not column and not relationship'
matrix:
allow_failures:
- python: "3.9-dev"
- python: "nightly"
- python: "pypy3.5"
include:
- python: "pypy3.5"
env: ANYBLOK_DATABASE_DRIVER=postgresql+psycopg2cffi ANYBLOK_DATABASE_USER=postgres SQLSERVER='psql -c' SQLPYCLIENT='psycopg2cffi'
fast_finish: true
virtualenv:
system_site_packages: false
services:
- postgresql
- mysql
- docker
before_install:
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main" | sudo tee -a /etc/apt/sources.list; fi
- sudo apt-get update
- sudo apt-get install graphviz
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then sudo ACCEPT_EULA=Y apt-get install msodbcsql17; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then sudo ACCEPT_EULA=Y apt-get install mssql-tools; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then source ~/.bashrc; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then sudo apt-get install unixodbc-dev; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then docker pull mcr.microsoft.com/mssql/server:2019-latest; fi
- if [[ $ANYBLOK_DATABASE_DRIVER == 'mssql+pyodbc' ]]; then docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=AnyBl@k2019' -p 1433:1433 -d --name mssql mcr.microsoft.com/mssql/server:2019-latest; fi
install:
- pip install -U pip
- pip install wheel
- pip install sqlalchemy $SQLPYCLIENT
- pip install -U flake8 coverage pytest pytest-cov
- pip install colour passlib furl phonenumbers pycountry # special columns
- pip install coveralls
- pip install -U cryptography
- pip install -U coveralls
- pip install .
script:
- flake8 anyblok --exclude=*/tests/*
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy3.5' ]] && [[ $MARKERS == '' ]]; then pytest --cov-report= --cov=anyblok anyblok/tests; fi
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy3.5' ]] && [[ $MARKERS != '' ]]; then pytest -m "$MARKERS" --cov-report= --cov=anyblok anyblok/tests; fi
- $SQLSERVER 'drop database travis_ci_test;'
- anyblok_createdb --install-all-bloks
- pytest --cov-report= --cov=anyblok anyblok/bloks
after_success:
coveralls --data_file=.coverage --config_file=.coveragerc
You can’t perform that action at this time.