forked from pudo/dataset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
23 lines (23 loc) · 1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
language: python
python:
- '3.4'
- '3.3'
- '2.7'
env:
- DATABASE_URL=sqlite:///:memory:
- DATABASE_URL=postgresql+psycopg2://[email protected]/dataset
- DATABASE_URL=mysql+mysqlconnector://[email protected]/dataset?charset=utf8
install:
- pip install -U pip wheel
- pip install --allow-external mysql-connector-python mysql-connector-python flake8 psycopg2
before_script:
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://[email protected]/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://[email protected]/dataset' ]; then psql -c 'create database dataset;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'mysql+mysqlconnector://[email protected]/dataset?charset=utf8' ]; then mysql -e 'create database IF NOT EXISTS dataset DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'; fi"
script:
- flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test
- python setup.py test
cache:
directories:
- $HOME/.cache/pip