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:
|
postgres:
|
||||||
image: postgres:12
|
image: postgres:12
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: evennia
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_DB: evennia
|
POSTGRES_DB: evennia
|
||||||
|
POSTGRES_PASSWORD: evennia
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
|
|
@ -47,15 +47,31 @@ jobs:
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 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:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up database (${{ matrix.TESTING_DB }})
|
# - name: Set up database (${{ matrix.TESTING_DB }})
|
||||||
if: matrix.TESTING_DB != 'postgresql'
|
# uses: ./.github/actions/setup-database
|
||||||
uses: ./.github/actions/setup-database
|
# with:
|
||||||
with:
|
# database: ${{ matrix.TESTING_DB }}
|
||||||
database: ${{ matrix.TESTING_DB }}
|
# timeout-minutes: 5
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
|
|
@ -93,6 +109,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
POSTGRES_HOST: localhost
|
POSTGRES_HOST: localhost
|
||||||
POSTGRES_PORT: 5432
|
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
|
# OBS - it's important to not run the coverage tests with --parallel, it messes up the coverage
|
||||||
# calculation!
|
# 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",
|
"ENGINE": "django.db.backends.mysql",
|
||||||
"NAME": "evennia",
|
"NAME": "evennia",
|
||||||
"USER": "evennia",
|
"USER": "evennia",
|
||||||
"PASSWORD": "password",
|
"PASSWORD": "evennia",
|
||||||
"HOST": "127.0.0.1",
|
"HOST": os.environ.get("MYSQL_HOST", "127.0.0.1"),
|
||||||
"PORT": "", # use default port
|
"PORT": os.environ.get("MYSQL_PORT", "3306"),
|
||||||
"OPTIONS": {
|
# "OPTIONS": {
|
||||||
"charset": "utf8mb4",
|
# "charset": "utf8mb4",
|
||||||
"init_command": "set collation_connection=utf8mb4_unicode_ci",
|
# "init_command": "set collation_connection=utf8mb4_unicode_ci",
|
||||||
},
|
# },
|
||||||
"TEST": {
|
# "TEST": {
|
||||||
"NAME": "evennia",
|
# "NAME": "evennia",
|
||||||
"OPTIONS": {
|
# "OPTIONS": {
|
||||||
"charset": "utf8mb4",
|
# "charset": "utf8mb4",
|
||||||
"init_command": "set collation_connection=utf8mb4_unicode_ci",
|
# "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": {
|
"default": {
|
||||||
"ENGINE": "django.db.backends.postgresql",
|
"ENGINE": "django.db.backends.postgresql",
|
||||||
"NAME": "evennia",
|
"NAME": "evennia",
|
||||||
"USER": "postgres", # evennia
|
"USER": "evennia",
|
||||||
"PASSWORD": "postgres",
|
"PASSWORD": "evennia",
|
||||||
"HOST": os.environ.get("POSTGRES_HOST", "localhost"),
|
"HOST": os.environ.get("POSTGRES_HOST", "localhost"),
|
||||||
"PORT": os.environ.get("POSTGRES_PORT", "5432"),
|
"PORT": os.environ.get("POSTGRES_PORT", "5432"),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue