forked from evennia/evennia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (42 loc) · 1.38 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
dist: xenial
language: python
cache: pip
services:
- postgresql
- mysql
python:
- "3.7"
- "3.8"
env:
- TESTING_DB=sqlite3
- TESTING_DB=postgresql
- TESTING_DB=mysql
before_install:
# - psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE evennia TO evennia;"
- psql --version
- psql -U postgres -c "CREATE DATABASE evennia;"
- psql -U postgres -c "CREATE USER evennia WITH PASSWORD 'password';"
- psql -U postgres -c "ALTER USER evennia CREATEDB;"
- mysql --version
- mysql -u root -e "CREATE DATABASE evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
- mysql -u root -e "CREATE USER 'evennia'@'localhost' IDENTIFIED BY 'password';"
- mysql -u root -e "GRANT ALL ON *.* TO 'evennia'@'localhost' IDENTIFIED BY 'password';"
install:
- pip install psycopg2-binary
- pip install mysqlclient
- pip install coveralls
- pip install codacy-coverage
- pip install -e .
before_script:
- make format
- evennia --init testing_mygame
- cp .travis/${TESTING_DB}_settings.py testing_mygame/server/conf/settings.py
- cd testing_mygame
- evennia migrate
- evennia collectstatic --noinput
script:
- coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../bin/unix/evennia test --settings=settings --keepdb evennia
after_success:
- coveralls
- coverage xml
- python-codacy-coverage -r coverage.xml