mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 12:56:30 +01:00
Testing to clean up mysql action too
This commit is contained in:
parent
fba1359d91
commit
50417d8970
3 changed files with 42 additions and 24 deletions
34
.github/workflows/github_action_test_suite.yml
vendored
34
.github/workflows/github_action_test_suite.yml
vendored
|
|
@ -36,9 +36,9 @@ jobs:
|
|||
postgres:
|
||||
image: postgres:12
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: evennia
|
||||
POSTGRES_DB: evennia
|
||||
POSTGRES_PASSWORD: evennia
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
|
|
@ -47,15 +47,31 @@ jobs:
|
|||
ports:
|
||||
- 5432:5432
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root_password
|
||||
MYSQL_DATABASE: evennia
|
||||
MYSQL_USER: evennia
|
||||
MYSQL_PASSWORD: evennia
|
||||
options: >-
|
||||
--health-cmd "mysqladmin ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
--charset "utf8mb4"
|
||||
--init_command "set collation_connection=utf8mb4_unicode_ci"
|
||||
ports:
|
||||
- 3306:3306
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up database (${{ matrix.TESTING_DB }})
|
||||
if: matrix.TESTING_DB != 'postgresql'
|
||||
uses: ./.github/actions/setup-database
|
||||
with:
|
||||
database: ${{ matrix.TESTING_DB }}
|
||||
timeout-minutes: 5
|
||||
# - name: Set up database (${{ matrix.TESTING_DB }})
|
||||
# uses: ./.github/actions/setup-database
|
||||
# with:
|
||||
# database: ${{ matrix.TESTING_DB }}
|
||||
# timeout-minutes: 5
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
|
|
@ -93,6 +109,8 @@ jobs:
|
|||
env:
|
||||
POSTGRES_HOST: localhost
|
||||
POSTGRES_PORT: 5432
|
||||
MYSQL_HOST: 127.0.0.1
|
||||
MYSQL_PORT: 3306
|
||||
|
||||
# OBS - it's important to not run the coverage tests with --parallel, it messes up the coverage
|
||||
# calculation!
|
||||
|
|
|
|||
28
.github/workflows/mysql_settings.py
vendored
28
.github/workflows/mysql_settings.py
vendored
|
|
@ -43,20 +43,20 @@ DATABASES = {
|
|||
"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",
|
||||
},
|
||||
},
|
||||
"PASSWORD": "evennia",
|
||||
"HOST": os.environ.get("MYSQL_HOST", "127.0.0.1"),
|
||||
"PORT": os.environ.get("MYSQL_PORT", "3306"),
|
||||
# "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",
|
||||
# },
|
||||
# },
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
4
.github/workflows/postgresql_settings.py
vendored
4
.github/workflows/postgresql_settings.py
vendored
|
|
@ -42,8 +42,8 @@ DATABASES = {
|
|||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "evennia",
|
||||
"USER": "postgres", # evennia
|
||||
"PASSWORD": "postgres",
|
||||
"USER": "evennia",
|
||||
"PASSWORD": "evennia",
|
||||
"HOST": os.environ.get("POSTGRES_HOST", "localhost"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT", "5432"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue