Add my.conf file do mysql test
This commit is contained in:
parent
83d643342e
commit
c74fa3f725
3 changed files with 11 additions and 11 deletions
17
.travis.yml
17
.travis.yml
|
|
@ -17,17 +17,16 @@ env:
|
||||||
before_install:
|
before_install:
|
||||||
|
|
||||||
# - psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE evennia TO evennia;"
|
# - psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE evennia TO evennia;"
|
||||||
- psql -U postgres -c "CREATE DATABASE evennia;"
|
- if [[ $TESTING_DB == postgresql ]]; psql -U postgres -c "CREATE DATABASE evennia;" fi
|
||||||
- psql -U postgres -c "CREATE USER evennia WITH PASSWORD 'password';"
|
- if [[ $TESTING_DB == postgresql ]]; psql -U postgres -c "CREATE USER evennia WITH PASSWORD 'password';" fi
|
||||||
- psql -U postgres -c "ALTER USER evennia CREATEDB;"
|
- if [[ $TESTING_DB == postgresql ]]; psql -U postgres -c "ALTER USER evennia CREATEDB;" fi
|
||||||
- mysql -u root -e "CREATE DATABASE evennia CHARACTER SET utf8mb4;"
|
- if [[ $TESTING_DB == mysql ]]; then mysql -u root -e "CREATE DATABASE evennia CHARACTER SET utf8mb4;" fi
|
||||||
- mysql -u root -e "CREATE USER 'evennia'@'localhost' IDENTIFIED BY 'password';"
|
- if [[ $TESTING_DB == mysql ]]; then mysql -u root -e "CREATE USER 'evennia'@'localhost' IDENTIFIED BY 'password';" fi
|
||||||
- mysql -u root -e "GRANT ALL ON *.* TO 'evennia'@'localhost' IDENTIFIED BY 'password';"
|
- if [[ $TESTING_DB == mysql ]]; mysql -u root -e "GRANT ALL ON *.* TO 'evennia'@'localhost' IDENTIFIED BY 'password';" fi
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install psycopg2-binary
|
- if [[ $TESTING_DB == postgresql ]]; pip install psycopg2-binary fi
|
||||||
- pip install mysqlclient
|
- if [[ $TESTING_DB == mysql ]]; pip install mysqlclient fi
|
||||||
- pip install PyMySQL
|
|
||||||
- pip install coveralls
|
- pip install coveralls
|
||||||
- pip install -e .
|
- pip install -e .
|
||||||
|
|
||||||
|
|
|
||||||
1
.travis/my.conf
Normal file
1
.travis/my.conf
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
init_connect='SET collation_connection = utf8_general_ci; SET NAMES utf8;'
|
||||||
|
|
@ -47,12 +47,12 @@ DATABASES = {
|
||||||
'HOST': 'localhost',
|
'HOST': 'localhost',
|
||||||
'PORT': '', # use default port
|
'PORT': '', # use default port
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'init_command': 'SET collation_connection = utf8_general_ci'
|
'read_default_file': '.travis/my.conf'
|
||||||
},
|
},
|
||||||
'TEST': {
|
'TEST': {
|
||||||
'NAME': 'default',
|
'NAME': 'default',
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'init_command': 'SET collation_connection = utf8_general_ci'
|
'read_default_file': '.travis/my.conf'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue