forked from sdispater/orator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (49 loc) · 1.32 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
language: python
stages:
- linting
- test
cache:
pip: true
directories:
- $HOME/.cache/pypoetry
services:
- mysql
addons:
postgresql: '9.6'
install:
- curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
- python get-poetry.py --preview -y
- source $HOME/.poetry/env
- if [[ $MYSQL_PACKAGE == 'pymysql' ]]; then poetry install --extras mysql-python --extras pgsql; fi
- if [[ $MYSQL_PACKAGE == 'mysqlclient' ]]; then poetry install --extras mysql --extras pgsql; fi
script: pytest tests/
before_script:
- psql -c 'create database orator_test;' -U postgres
- mysql -e 'create database orator_test;'
jobs:
include:
- python: "2.7"
env: MYSQL_PACKAGE=pymysql
- python: "2.7"
env: MYSQL_PACKAGE=mysqlclient
- python: "3.5"
env: MYSQL_PACKAGE=pymysql
- python: "3.5"
env: MYSQL_PACKAGE=mysqlclient
- python: "3.6"
env: MYSQL_PACKAGE=pymysql
- python: "3.6"
env: MYSQL_PACKAGE=mysqlclient
- python: "3.7"
env: MYSQL_PACKAGE=pymysql
dist: xenial
- python: "3.7"
env: MYSQL_PACKAGE=mysqlclient
dist: xenial
- stage: linting
python: "3.6"
install:
- pip install pre-commit
- pre-commit install-hooks
script:
- pre-commit run --all-files