File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,7 @@ install:
20
20
- pip install -U setuptools tox tox-travis
21
21
22
22
before_script :
23
- - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS test;' -U postgres;
24
- psql -c 'create database test;' -U postgres; export DBURI='postgresql+psycopg2://postgres@localhost/test';
25
- fi"
26
- - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE SCHEMA test DEFAULT CHARACTER SET utf8;';
27
- export DBURI='mysql+mysqldb://test@localhost/test?charset=utf8'; fi"
28
- - sh -c "if [ '$DB' = 'sqlite' ]; then export DBURI='sqlite:///%(here)s/test.sqlite';
29
- fi"
23
+ - ./travis-ci.sh
30
24
31
25
script : tox
32
26
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ commands =
10
10
deps =
11
11
psycopg2
12
12
mysqlclient
13
+ py{34,35,36,37}: mysql-connector
13
14
14
15
[testenv:lint]
15
16
commands = flake8 rdflib_sqlalchemy test
@@ -27,9 +28,10 @@ deps =
27
28
psycopg2
28
29
mysqlclient
29
30
30
- [tox:travis]
31
- 2.7 = py27, cover, lint
32
- 3.5 = py35, lint
31
+ [travis]
32
+ python =
33
+ 2.7: py27, cover, lint
34
+ 3.5: py35, lint
33
35
34
36
[flake8]
35
37
max-line-length = 120
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -ex
2
+
3
+ if [ " $DB " = ' pgsql' ]; then
4
+ psql -c ' DROP DATABASE IF EXISTS test;' -U postgres
5
+ psql -c ' create database test;' -U postgres
6
+ export DBURI=' postgresql+psycopg2://postgres@localhost/test'
7
+ fi
8
+
9
+ if [ " $DB " = ' mysql' ]; then
10
+ mysql -e ' CREATE SCHEMA test DEFAULT CHARACTER SET utf8;'
11
+ if [[ " $TRAVIS_PYTHON_VERSION " =~ ' .*3\.[4567].*' ]] ; then
12
+ export DBURI=' mysql+mysqlconnector://test@localhost/test?charset=utf8'
13
+ else
14
+ export DBURI=' mysql+mysqldb://test@localhost/test?charset=utf8'
15
+ fi
16
+ fi
17
+
18
+ if [ " $DB " = ' sqlite' ]; then
19
+ export DBURI=' sqlite:///%(here)s/test.sqlite'
20
+ fi
You can’t perform that action at this time.
0 commit comments