From f60bb650c640194d36e8c48d315315a27211440e Mon Sep 17 00:00:00 2001 From: Alessandro Ogier Date: Mon, 25 Jul 2022 11:51:11 +0200 Subject: [PATCH] parallel tests --- .../workflows/github_action_test_suite.yml | 58 ++++++++++++++++--- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/.github/workflows/github_action_test_suite.yml b/.github/workflows/github_action_test_suite.yml index c39be50e4b..3650414c13 100644 --- a/.github/workflows/github_action_test_suite.yml +++ b/.github/workflows/github_action_test_suite.yml @@ -33,6 +33,7 @@ jobs: postgresql db: 'evennia' postgresql user: 'evennia' postgresql password: 'password' + - name: Set up MySQL server uses: mirromutth/mysql-action@v1.1 if: ${{ matrix.TESTING_DB == 'mysql'}} @@ -46,16 +47,48 @@ jobs: mysql database: 'evennia' mysql user: 'evennia' mysql password: 'password' + mysql root password: root_password - # wait for db to activage, get logs from their start - - name: Wait / sleep - uses: jakejarvis/wait-action@v0.1.0 - if: ${{ matrix.TESTING_DB == 'postgresql' || matrix.TESTING_DB == 'mysql' }} - with: - time: '10s' + # wait for db to activate + - name: wait for db to activate + if: matrix.TESTING_DB == 'postgresql' || matrix.TESTING_DB == 'mysql' + run: | + + if [ ${{ matrix.TESTING_DB }} = mysql ] + then + while ! mysqladmin ping -h 127.0.0.1 -u root -proot_password -s >/dev/null 2>&1 + do + sleep 1 + echo -n . + done + echo + else + while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1 + do + sleep 1 + echo -n . + done + echo + fi + + - name: mysql privileges + if: matrix.TESTING_DB == 'mysql' + run: | + + cat <