Testing shrinking the matrix

This commit is contained in:
Griatch 2024-06-27 22:00:52 +02:00
parent 856780b8a0
commit 762761a01b
3 changed files with 27 additions and 44 deletions

View file

@ -19,25 +19,25 @@ runs:
using: "composite" using: "composite"
steps: steps:
# - name: Set up PostgreSQL server - name: Set up PostgreSQL server
# if: ${{ inputs.database == 'postgresql' }} if: ${{ inputs.database == 'postgresql' }}
# uses: harmon758/postgresql-action@v1 uses: harmon758/postgresql-action@v1
# with: with:
# postgresql version: "12" postgresql version: "12"
# postgresql db: "evennia" postgresql db: "evennia"
# postgresql user: "evennia" postgresql user: "evennia"
# postgresql password: "password" postgresql password: "password"
# - name: Wait for PostgreSQL to activate - name: Wait for PostgreSQL to activate
# if: ${{ inputs.database == 'postgresql' }} if: ${{ inputs.database == 'postgresql' }}
# run: | run: |
# while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1 while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1
# do do
# sleep 1 sleep 1
# echo -n . echo -n .
# done done
# echo echo
# shell: bash shell: bash
- name: Set up MySQL server - name: Set up MySQL server
if: ${{ inputs.database == 'mysql' }} if: ${{ inputs.database == 'mysql' }}

View file

@ -19,7 +19,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: ["3.10", "3.11", "3.12"] python-version: ["3.12"]
TESTING_DB: ["sqlite3", "postgresql", "mysql"] TESTING_DB: ["sqlite3", "postgresql", "mysql"]
include: include:
- python-version: "3.10" - python-version: "3.10"
@ -32,25 +32,10 @@ jobs:
UNIT_TEST_SETTINGS: "--settings=settings --timing --parallel auto" UNIT_TEST_SETTINGS: "--settings=settings --timing --parallel auto"
COVERAGE_TEST_SETTINGS: "--settings=settings --timing" COVERAGE_TEST_SETTINGS: "--settings=settings --timing"
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: evennia
POSTGRES_DB: evennia
POSTGRES_PASSWORD: evennia
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up MySQL - name: Set up {{ matrix.TESTING_DB }} database
if: ${{ matrix.TESTING_DB == 'mysql' }} if: ${{ matrix.TESTING_DB == 'mysql' }}
uses: ./.github/actions/setup-database uses: ./.github/actions/setup-database
with: with:
@ -89,9 +74,7 @@ jobs:
if: ${{ ! matrix.coverage-test }} if: ${{ ! matrix.coverage-test }}
working-directory: testing_mygame working-directory: testing_mygame
run: | run: |
echo "::group::Running tests ..."
evennia test ${{ env.UNIT_TEST_SETTINGS }} evennia evennia test ${{ env.UNIT_TEST_SETTINGS }} evennia
echo "::endgroup::"
env: env:
POSTGRES_HOST: localhost POSTGRES_HOST: localhost
POSTGRES_PORT: 5432 POSTGRES_PORT: 5432

View file

@ -50,13 +50,13 @@ DATABASES = {
"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",
}, # },
}, # },
} }
} }