Reverting to old mysql test suite

This commit is contained in:
Griatch 2024-06-27 20:37:50 +02:00
parent fa99218c31
commit e5eccb046c
2 changed files with 31 additions and 56 deletions

View file

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

View file

@ -26,7 +26,7 @@ jobs:
TESTING_DB: "sqlite3"
coverage-test: true
timeout-minutes: 35
timeout-minutes: 40
env:
UNIT_TEST_SETTINGS: "--settings=settings --keepdb --timing"
@ -40,47 +40,22 @@ jobs:
POSTGRES_DB: evennia
POSTGRES_PASSWORD: evennia
options: >-
--health-cmd=pg_isready
--health-interval=10s
--health-timeout=5s
--health-retries=5
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 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
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
--innodb-large-prefix=1
--innodb-file-format=Barracuda
--innodb-file-per-table=1
ports:
- 3306:3306
steps:
- uses: actions/checkout@v3
# - name: Reboot MySQL with custom options
# if: ${{ matrix.TESTING_DB == 'mysql' }}
# run: |
# sudo cp ${{ github.workspace }}/.github/workflows/mysql_options.cnf /etc/mysql/conf.d/custom.cnf
# sudo chown -R mysql:mysql /etc/mysql/conf.d/custom.cnf
# - name: Set up database (${{ matrix.TESTING_DB }})
# uses: ./.github/actions/setup-database
# with:
# database: ${{ matrix.TESTING_DB }}
# timeout-minutes: 5
- name: Set up MySQL
if: ${{ matrix.TESTING_DB == 'mysql' }}
uses: ./.github/actions/setup-database
with:
database: ${{ matrix.TESTING_DB }}
timeout-minutes: 5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4