diff --git a/.github/actions/setup-database/action.yml b/.github/actions/setup-database/action.yml index 96c7da4022..e6bd65f5de 100644 --- a/.github/actions/setup-database/action.yml +++ b/.github/actions/setup-database/action.yml @@ -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' }} diff --git a/.github/workflows/github_action_test_suite.yml b/.github/workflows/github_action_test_suite.yml index 90e80b4e42..20b313e531 100644 --- a/.github/workflows/github_action_test_suite.yml +++ b/.github/workflows/github_action_test_suite.yml @@ -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 diff --git a/.github/workflows/mysql_settings.py b/.github/workflows/mysql_settings.py index 7ffa74c347..16fdb74b9e 100644 --- a/.github/workflows/mysql_settings.py +++ b/.github/workflows/mysql_settings.py @@ -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", +# }, +# }, } }