forked from PyMySQL/mysqlclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (69 loc) · 1.77 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
dist: xenial
language: python
# See aws s3 ls s3://travis-python-archives/binaries/ubuntu/16.04/x86_64/
python:
- "nightly"
- "pypy3"
- "3.8"
- "3.7"
- "3.6"
- "3.5"
cache: pip
services:
- mysql
install:
- pip install -U pip
- pip install -U mock coverage pytest pytest-cov codecov
env:
global:
- TESTDB=travis.cnf
before_script:
- "mysql --help"
- "mysql --print-defaults"
- "mysql -e 'create database mysqldb_test charset utf8mb4;'"
script:
- pip install -e .
- pytest --cov ./MySQLdb
after_success:
- codecov
jobs:
fast_finish: true
include:
- &django_2_2
name: "Django 2.2 test"
env:
- DJANGO_VERSION=2.2.7
python: "3.5"
install:
- pip install -U pip
- wget https://github.com/django/django/archive/${DJANGO_VERSION}.tar.gz
- tar xf ${DJANGO_VERSION}.tar.gz
- pip install -e django-${DJANGO_VERSION}/
- cp ci/test_mysql.py django-${DJANGO_VERSION}/tests/
- pip install .
before_script:
- mysql -e 'create user django identified by "secret"'
- mysql -e 'grant all on *.* to django'
- mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql
script:
- cd django-${DJANGO_VERSION}/tests/
- ./runtests.py --parallel=1 --settings=test_mysql
- name: flake8
python: "3.8"
install:
- pip install -U pip
- pip install flake8
script:
- flake8 --ignore=E203,E501,W503 --max-line-length=88 .
- name: black
python: "3.8"
install:
- pip install -U pip
- pip install black
script:
- black --check --exclude=doc/ .
#- &django_3_0
# <<: *django_2_2
# name: "Django 3.0 test (Python 3.8)"
# python: "3.8"
# vim: sw=2 ts=2 sts=2