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" 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' }}
@ -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: "password" mysql password: "evennia"
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 'password'; create user 'evennia'@'%' identified by 'evennia';
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

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