MySQL action working, doing cleanup
This commit is contained in:
parent
52eee6d299
commit
bdffac6f36
5 changed files with 179 additions and 4 deletions
|
|
@ -16,9 +16,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7, 3.8]
|
python-version: [3.7, 3.8]
|
||||||
# TODO: mysql disabled, not able to connect to it so far
|
|
||||||
TESTING_DB: ['sqlite3', 'postgresql', 'mysql']
|
TESTING_DB: ['sqlite3', 'postgresql', 'mysql']
|
||||||
# fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|
@ -76,7 +75,7 @@ jobs:
|
||||||
- name: Initialize evennia
|
- name: Initialize evennia
|
||||||
run: |
|
run: |
|
||||||
evennia --init testing_mygame
|
evennia --init testing_mygame
|
||||||
cp .travis/${{ matrix.TESTING_DB }}_settings.py testing_mygame/server/conf/settings.py
|
cp .github/workflows/${{ matrix.TESTING_DB }}_settings.py testing_mygame/server/conf/settings.py
|
||||||
cd testing_mygame
|
cd testing_mygame
|
||||||
evennia migrate
|
evennia migrate
|
||||||
evennia collectstatic --noinput
|
evennia collectstatic --noinput
|
||||||
70
.github/workflows/mysql_settings.py
vendored
Normal file
70
.github/workflows/mysql_settings.py
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
"""
|
||||||
|
Evennia settings file.
|
||||||
|
|
||||||
|
The available options are found in the default settings file found
|
||||||
|
here:
|
||||||
|
|
||||||
|
/home/griatch/Devel/Home/evennia/evennia/evennia/settings_default.py
|
||||||
|
|
||||||
|
Remember:
|
||||||
|
|
||||||
|
Don't copy more from the default file than you actually intend to
|
||||||
|
change; this will make sure that you don't overload upstream updates
|
||||||
|
unnecessarily.
|
||||||
|
|
||||||
|
When changing a setting requiring a file system path (like
|
||||||
|
path/to/actual/file.py), use GAME_DIR and EVENNIA_DIR to reference
|
||||||
|
your game folder and the Evennia library folders respectively. Python
|
||||||
|
paths (path.to.module) should be given relative to the game's root
|
||||||
|
folder (typeclasses.foo) whereas paths within the Evennia library
|
||||||
|
needs to be given explicitly (evennia.foo).
|
||||||
|
|
||||||
|
If you want to share your game dir, including its settings, you can
|
||||||
|
put secret game- or server-specific settings in secret_settings.py.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Use the defaults from Evennia unless explicitly overridden
|
||||||
|
from evennia.settings_default import *
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Evennia base server config
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
# This is the name of your game. Make it catchy!
|
||||||
|
SERVERNAME = "testing_mygame"
|
||||||
|
|
||||||
|
# Testing database types
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
"default": {
|
||||||
|
"ENGINE": "django.db.backends.mysql",
|
||||||
|
"NAME": "evennia",
|
||||||
|
"USER": "evennia",
|
||||||
|
"PASSWORD": "password",
|
||||||
|
"HOST": "127.0.0.1",
|
||||||
|
"PORT": "", # use default port
|
||||||
|
"OPTIONS": {
|
||||||
|
"charset": "utf8mb4",
|
||||||
|
"init_command": "set collation_connection=utf8mb4_unicode_ci",
|
||||||
|
},
|
||||||
|
"TEST": {
|
||||||
|
"NAME": "evennia",
|
||||||
|
"OPTIONS": {
|
||||||
|
"charset": "utf8mb4",
|
||||||
|
'init_command': 'set collation_connection=utf8mb4_unicode_ci'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Settings given in secret_settings.py override those in this file.
|
||||||
|
######################################################################
|
||||||
|
try:
|
||||||
|
from server.conf.secret_settings import *
|
||||||
|
except ImportError:
|
||||||
|
print("secret_settings.py file not found or failed to import.")
|
||||||
60
.github/workflows/postgresql_settings.py
vendored
Normal file
60
.github/workflows/postgresql_settings.py
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
"""
|
||||||
|
Evennia settings file.
|
||||||
|
|
||||||
|
The available options are found in the default settings file found
|
||||||
|
here:
|
||||||
|
|
||||||
|
/home/griatch/Devel/Home/evennia/evennia/evennia/settings_default.py
|
||||||
|
|
||||||
|
Remember:
|
||||||
|
|
||||||
|
Don't copy more from the default file than you actually intend to
|
||||||
|
change; this will make sure that you don't overload upstream updates
|
||||||
|
unnecessarily.
|
||||||
|
|
||||||
|
When changing a setting requiring a file system path (like
|
||||||
|
path/to/actual/file.py), use GAME_DIR and EVENNIA_DIR to reference
|
||||||
|
your game folder and the Evennia library folders respectively. Python
|
||||||
|
paths (path.to.module) should be given relative to the game's root
|
||||||
|
folder (typeclasses.foo) whereas paths within the Evennia library
|
||||||
|
needs to be given explicitly (evennia.foo).
|
||||||
|
|
||||||
|
If you want to share your game dir, including its settings, you can
|
||||||
|
put secret game- or server-specific settings in secret_settings.py.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Use the defaults from Evennia unless explicitly overridden
|
||||||
|
from evennia.settings_default import *
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Evennia base server config
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
# This is the name of your game. Make it catchy!
|
||||||
|
SERVERNAME = "testing_mygame"
|
||||||
|
|
||||||
|
# Testing database types
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
"default": {
|
||||||
|
"ENGINE": "django.db.backends.postgresql",
|
||||||
|
"NAME": "evennia",
|
||||||
|
"USER": "evennia",
|
||||||
|
"PASSWORD": "password",
|
||||||
|
"HOST": "localhost",
|
||||||
|
"PORT": "", # use default
|
||||||
|
"TEST": {"NAME": "default"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Settings given in secret_settings.py override those in this file.
|
||||||
|
######################################################################
|
||||||
|
try:
|
||||||
|
from server.conf.secret_settings import *
|
||||||
|
except ImportError:
|
||||||
|
print("secret_settings.py file not found or failed to import.")
|
||||||
47
.github/workflows/sqlite3_settings.py
vendored
Normal file
47
.github/workflows/sqlite3_settings.py
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
"""
|
||||||
|
Evennia settings file.
|
||||||
|
|
||||||
|
The available options are found in the default settings file found
|
||||||
|
here:
|
||||||
|
|
||||||
|
/home/griatch/Devel/Home/evennia/evennia/evennia/settings_default.py
|
||||||
|
|
||||||
|
Remember:
|
||||||
|
|
||||||
|
Don't copy more from the default file than you actually intend to
|
||||||
|
change; this will make sure that you don't overload upstream updates
|
||||||
|
unnecessarily.
|
||||||
|
|
||||||
|
When changing a setting requiring a file system path (like
|
||||||
|
path/to/actual/file.py), use GAME_DIR and EVENNIA_DIR to reference
|
||||||
|
your game folder and the Evennia library folders respectively. Python
|
||||||
|
paths (path.to.module) should be given relative to the game's root
|
||||||
|
folder (typeclasses.foo) whereas paths within the Evennia library
|
||||||
|
needs to be given explicitly (evennia.foo).
|
||||||
|
|
||||||
|
If you want to share your game dir, including its settings, you can
|
||||||
|
put secret game- or server-specific settings in secret_settings.py.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Use the defaults from Evennia unless explicitly overridden
|
||||||
|
from evennia.settings_default import *
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Evennia base server config
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
# This is the name of your game. Make it catchy!
|
||||||
|
SERVERNAME = "testing_mygame"
|
||||||
|
|
||||||
|
# Using default sqlite3 settings
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Settings given in secret_settings.py override those in this file.
|
||||||
|
######################################################################
|
||||||
|
try:
|
||||||
|
from server.conf.secret_settings import *
|
||||||
|
except ImportError:
|
||||||
|
print("secret_settings.py file not found or failed to import.")
|
||||||
|
|
@ -55,7 +55,6 @@ DATABASES = {
|
||||||
"OPTIONS": {
|
"OPTIONS": {
|
||||||
"charset": "utf8mb4",
|
"charset": "utf8mb4",
|
||||||
'init_command': 'set collation_connection=utf8mb4_unicode_ci'
|
'init_command': 'set collation_connection=utf8mb4_unicode_ci'
|
||||||
# "init_command": "SET NAMES 'utf8mb4'",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue