diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6443f8119..b230066908 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -223,8 +223,18 @@ jobs: env: RUBY_VERSION: ${{ matrix.ruby-version }} - - name: Test MySQL - run: mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -proot -e "SHOW GRANTS FOR 'root'@'localhost'" + + - name: Wait for/Check Mysql + uses: nick-fields/retry@v2.8.2 + with: + timeout_minutes: 1 + max_attempts: 20 + command: | + mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -proot -e "SHOW GRANTS FOR 'root'@'localhost'"; + if [[ $? != 0 ]]; then + sleep 1; + fi + - name: Run Multiverse Tests uses: nick-fields/retry@v2.8.2 diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index 348cbf0e77..8c3218dafb 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -243,8 +243,18 @@ jobs: env: RUBY_VERSION: ${{ matrix.ruby-version }} - - name: Test MySQL - run: mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -proot -e "SHOW GRANTS FOR 'root'@'localhost'" + + - name: Wait for/Check Mysql + uses: nick-fields/retry@v2.8.2 + with: + timeout_minutes: 1 + max_attempts: 20 + command: | + mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -proot -e "SHOW GRANTS FOR 'root'@'localhost'"; + if [[ $? != 0 ]]; then + sleep 1; + fi + - name: Run Multiverse Tests uses: nick-fields/retry@v2.8.2 diff --git a/.github/workflows/ci_jruby.yml b/.github/workflows/ci_jruby.yml index bb4c1f33bc..55192589fc 100644 --- a/.github/workflows/ci_jruby.yml +++ b/.github/workflows/ci_jruby.yml @@ -154,7 +154,7 @@ jobs: env: TEST_CMD: "bundle exec rake test:multiverse[group=${{ matrix.multiverse }}]" VERBOSE_TEST_OUTPUT: true - RETRY_ATTEMPS: 2 + RETRY_ATTEMPS: 5 SERIALIZE: 1 DB_PORT: ${{ job.services.mysql.ports[3306] }} JRUBY_OPTS: --dev --debug diff --git a/.github/workflows/scripts/retry_command b/.github/workflows/scripts/retry_command index bce91b10f9..84d9b70535 100755 --- a/.github/workflows/scripts/retry_command +++ b/.github/workflows/scripts/retry_command @@ -10,6 +10,11 @@ while [[ $return_val != 0 && $count -le $RETRY_ATTEMPTS ]]; do $TEST_CMD return_val=$? count+=1 + if [[ $return_val != 0 ]]; then + echo $'\n*************************************************************************************************************\n' + echo "FAILURE ON ATTEMPT $((count+1)) of $((RETRY_ATTEMPTS+1))" + echo $'\n*************************************************************************************************************\n' + fi done exit $return_val \ No newline at end of file