From 44d195a06079d47c01a6a2be052d3d363c87f0ba Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 6 Jul 2021 19:53:02 +0200 Subject: [PATCH] GH Actions: automatically retry postfix install on failure The postfix installation step fails regularly, resulting in failed CI builds which have to be restarted, while the failure is not due to anything in the PR. This commit introduces a new action runner for the postfix install, which will automatically retry the install up to 3 times. If it works as I expect it to, this should eliminate failed CI builds due to postfix installs erroring out. Ref: https://github.com/marketplace/actions/retry-step --- .github/workflows/tests.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 411e2b46..ce7a7c88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -131,10 +131,17 @@ jobs: with: composer-options: --ignore-platform-reqs + # Install postfix and automatically retry if the install failed, which happens reguarly. + # @link https://github.com/marketplace/actions/retry-step - name: Install postfix - run: | - sudo apt-get install -y -qq postfix qmail - sudo service postfix stop + uses: nick-invision/retry@v2 + with: + timeout_minutes: 2 + max_attempts: 3 + retry_wait_seconds: 5 + command: | + sudo apt-get install -y -qq postfix qmail + sudo service postfix stop - name: Set up sendmail run: | @@ -145,7 +152,7 @@ jobs: sudo mkdir -p /var/qmail/bin sudo cp test/fakesendmail.sh /var/qmail/bin/sendmail sudo cp test/fakesendmail.sh /usr/sbin/sendmail - + - name: Run tests, no code coverage if: ${{ matrix.coverage == false }} run: ./vendor/bin/phpunit --no-coverage