mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 12:56:30 +01:00
Testing shrinking the matrix
This commit is contained in:
parent
856780b8a0
commit
762761a01b
3 changed files with 27 additions and 44 deletions
36
.github/actions/setup-database/action.yml
vendored
36
.github/actions/setup-database/action.yml
vendored
|
|
@ -19,25 +19,25 @@ runs:
|
|||
using: "composite"
|
||||
|
||||
steps:
|
||||
# - name: Set up PostgreSQL server
|
||||
# if: ${{ inputs.database == 'postgresql' }}
|
||||
# uses: harmon758/postgresql-action@v1
|
||||
# with:
|
||||
# postgresql version: "12"
|
||||
# postgresql db: "evennia"
|
||||
# postgresql user: "evennia"
|
||||
# postgresql password: "password"
|
||||
- name: Set up PostgreSQL server
|
||||
if: ${{ inputs.database == 'postgresql' }}
|
||||
uses: harmon758/postgresql-action@v1
|
||||
with:
|
||||
postgresql version: "12"
|
||||
postgresql db: "evennia"
|
||||
postgresql user: "evennia"
|
||||
postgresql password: "password"
|
||||
|
||||
# - name: Wait for PostgreSQL to activate
|
||||
# if: ${{ inputs.database == 'postgresql' }}
|
||||
# run: |
|
||||
# while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1
|
||||
# do
|
||||
# sleep 1
|
||||
# echo -n .
|
||||
# done
|
||||
# echo
|
||||
# shell: bash
|
||||
- name: Wait for PostgreSQL to activate
|
||||
if: ${{ inputs.database == 'postgresql' }}
|
||||
run: |
|
||||
while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1
|
||||
do
|
||||
sleep 1
|
||||
echo -n .
|
||||
done
|
||||
echo
|
||||
shell: bash
|
||||
|
||||
- name: Set up MySQL server
|
||||
if: ${{ inputs.database == 'mysql' }}
|
||||
|
|
|
|||
21
.github/workflows/github_action_test_suite.yml
vendored
21
.github/workflows/github_action_test_suite.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11", "3.12"]
|
||||
python-version: ["3.12"]
|
||||
TESTING_DB: ["sqlite3", "postgresql", "mysql"]
|
||||
include:
|
||||
- python-version: "3.10"
|
||||
|
|
@ -32,25 +32,10 @@ jobs:
|
|||
UNIT_TEST_SETTINGS: "--settings=settings --timing --parallel auto"
|
||||
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:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up MySQL
|
||||
- name: Set up {{ matrix.TESTING_DB }} database
|
||||
if: ${{ matrix.TESTING_DB == 'mysql' }}
|
||||
uses: ./.github/actions/setup-database
|
||||
with:
|
||||
|
|
@ -89,9 +74,7 @@ jobs:
|
|||
if: ${{ ! matrix.coverage-test }}
|
||||
working-directory: testing_mygame
|
||||
run: |
|
||||
echo "::group::Running tests ..."
|
||||
evennia test ${{ env.UNIT_TEST_SETTINGS }} evennia
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
POSTGRES_HOST: localhost
|
||||
POSTGRES_PORT: 5432
|
||||
|
|
|
|||
14
.github/workflows/mysql_settings.py
vendored
14
.github/workflows/mysql_settings.py
vendored
|
|
@ -50,13 +50,13 @@ DATABASES = {
|
|||
"charset": "utf8mb4",
|
||||
"init_command": "set collation_connection=utf8mb4_unicode_ci",
|
||||
},
|
||||
"TEST": {
|
||||
"NAME": "evennia",
|
||||
"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",
|
||||
# },
|
||||
# },
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue