From 2fc0444c624e1794ff0c6783000afa9486e1d2d0 Mon Sep 17 00:00:00 2001 From: Fery Wardiyanto Date: Tue, 30 Jan 2024 03:59:23 +0700 Subject: [PATCH] ci: update test workflow Signed-off-by: Fery Wardiyanto --- .github/workflows/test.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d376c07..c370928 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,9 +30,9 @@ jobs: POSTGRES_DB: ${{ env.DB_DATABASE }} POSTGRES_USER: ${{ env.DB_USERNAME }} POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} + options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3 ports: - 5432:5432 - options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3 mysql: image: mysql:8.0 env: @@ -40,11 +40,7 @@ jobs: MYSQL_DATABASE: ${{ env.DB_DATABASE }} MYSQL_USER: ${{ env.DB_USERNAME }} MYSQL_PASSWORD: ${{ env.DB_PASSWORD }} - options: >- - --health-cmd="mysqladmin ping" - --health-interval=10s - --health-timeout=5s - --health-retries=3 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 ports: - 3306:3306 @@ -80,18 +76,13 @@ jobs: restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- - name: Install dependencies - uses: nick-invision/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 3 - command: | - composer update --prefer-dist --no-interaction --no-progress + run: composer update --prefer-dist --no-interaction --no-progress - name: Run tests run: composer test -- --coverage - name: Generate reports for CodeClimate - if: github.actor != 'dependabot[bot]' + if: ${{ github.actor != 'dependabot[bot]' }} env: COVERAGE_FILE: tests/reports/clover.xml CODECLIMATE_REPORT: ${{ github.workspace }}/tests/reports/codeclimate.${{ matrix.php }}.json @@ -101,14 +92,14 @@ jobs: - name: Upload tests reports uses: actions/upload-artifact@v4 - if: github.actor != 'dependabot[bot]' + if: ${{ github.actor != 'dependabot[bot]' }} with: name: test-reports-${{ matrix.php }}-${{ matrix.db }} path: tests/reports reports: name: Report Test Coverages - if: github.actor != 'dependabot[bot]' + if: ${{ github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest needs: tests