Revert CI experiments

This commit is contained in:
Griatch 2024-06-27 22:13:40 +02:00
parent 90cd9e8308
commit 609b646e45
4 changed files with 24 additions and 29 deletions

View file

@ -26,7 +26,7 @@ runs:
postgresql version: "12" postgresql version: "12"
postgresql db: "evennia" postgresql db: "evennia"
postgresql user: "evennia" postgresql user: "evennia"
postgresql password: "evennia" postgresql password: "password"
- name: Wait for PostgreSQL to activate - name: Wait for PostgreSQL to activate
if: ${{ inputs.database == 'postgresql' }} if: ${{ inputs.database == 'postgresql' }}
@ -50,7 +50,7 @@ runs:
collation server: "utf8_general_ci" collation server: "utf8_general_ci"
mysql database: "evennia" mysql database: "evennia"
mysql user: "evennia" mysql user: "evennia"
mysql password: "evennia" mysql password: "password"
mysql root password: root_password mysql root password: root_password
- name: Wait for MySQL to activate - name: Wait for MySQL to activate
@ -68,7 +68,7 @@ runs:
if: ${{ inputs.database == 'mysql' }} if: ${{ inputs.database == 'mysql' }}
run: | run: |
cat <<EOF | mysql -u root -proot_password -h 127.0.0.1 mysql cat <<EOF | mysql -u root -proot_password -h 127.0.0.1 mysql
create user 'evennia'@'%' identified by 'evennia'; create user 'evennia'@'%' identified by 'password';
grant all on \`evennia%\`.* to 'evennia'@'%'; grant all on \`evennia%\`.* to 'evennia'@'%';
grant process on *.* to 'evennia'@'%'; grant process on *.* to 'evennia'@'%';
flush privileges flush privileges

View file

@ -19,24 +19,23 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: ["3.12"] python-version: ["3.10", "3.11", "3.12"]
TESTING_DB: ["sqlite3", "postgresql", "mysql"] TESTING_DB: ["sqlite3", "postgresql", "mysql"]
include: include:
- python-version: "3.10" - python-version: "3.10"
TESTING_DB: "sqlite3" TESTING_DB: "sqlite3"
coverage-test: true coverage-test: true
timeout-minutes: 40 timeout-minutes: 35
env: env:
UNIT_TEST_SETTINGS: "--settings=settings --keepdb --timing --parallel auto" UNIT_TEST_SETTINGS: "--settings=settings --keepdb --timing"
COVERAGE_TEST_SETTINGS: "--settings=settings --timing" COVERAGE_TEST_SETTINGS: "--settings=settings --timing"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up {{ matrix.TESTING_DB }} database - name: Set up database (${{ matrix.TESTING_DB }})
if: ${{ matrix.TESTING_DB == 'mysql' }}
uses: ./.github/actions/setup-database uses: ./.github/actions/setup-database
with: with:
database: ${{ matrix.TESTING_DB }} database: ${{ matrix.TESTING_DB }}
@ -75,11 +74,6 @@ jobs:
working-directory: testing_mygame working-directory: testing_mygame
run: | run: |
evennia test ${{ env.UNIT_TEST_SETTINGS }} evennia evennia test ${{ env.UNIT_TEST_SETTINGS }} evennia
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 # OBS - it's important to not run the coverage tests with --parallel, it messes up the coverage
# calculation! # calculation!

View file

@ -43,20 +43,20 @@ DATABASES = {
"ENGINE": "django.db.backends.mysql", "ENGINE": "django.db.backends.mysql",
"NAME": "evennia", "NAME": "evennia",
"USER": "evennia", "USER": "evennia",
"PASSWORD": "evennia", "PASSWORD": "password",
"HOST": os.environ.get("MYSQL_HOST", "127.0.0.1"), "HOST": "127.0.0.1",
"PORT": os.environ.get("MYSQL_PORT", "3306"), "PORT": "", # use default port
"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",
# }, },
# }, },
} }
} }

View file

@ -43,9 +43,10 @@ DATABASES = {
"ENGINE": "django.db.backends.postgresql", "ENGINE": "django.db.backends.postgresql",
"NAME": "evennia", "NAME": "evennia",
"USER": "evennia", "USER": "evennia",
"PASSWORD": "evennia", "PASSWORD": "password",
"HOST": os.environ.get("POSTGRES_HOST", "localhost"), "HOST": "localhost",
"PORT": os.environ.get("POSTGRES_PORT", "5432"), "PORT": "", # use default
"TEST": {"NAME": "default"},
} }
} }