diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 2df8b3f09..ee4bba040 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -27,6 +27,7 @@ jobs: if: ${{ github.event.pull_request.base.ref == github.event.repository.default_branch }} name: Performance Regression Check runs-on: ubuntu-latest + timeout-minutes: 180 steps: - name: Checkout PR branch @@ -44,23 +45,35 @@ jobs: - name: Install dependencies uses: ramsey/composer-install@v3 - - name: Benchmark base branch + - name: Check out base branch run: | git checkout ${{ github.event.pull_request.base.sha }} cp .env.example .env sed -i 's/^INTERNAL_CACHES=.*/INTERNAL_CACHES=false/' .env sed -i 's/^DISCOVERY_CACHE=.*/DISCOVERY_CACHE=false/' .env - composer update --no-interaction --prefer-dist --quiet - vendor/bin/phpbench run --tag=base --store --progress=none - - name: Benchmark PR branch + - name: Install base branch dependencies + timeout-minutes: 20 + run: composer update --no-interaction --prefer-dist --quiet + + - name: Benchmark base branch + timeout-minutes: 70 + run: vendor/bin/phpbench run --tag=base --store --progress=none + + - name: Check out PR branch run: | git checkout ${{ github.event.pull_request.head.sha }} cp .env.example .env sed -i 's/^INTERNAL_CACHES=.*/INTERNAL_CACHES=false/' .env sed -i 's/^DISCOVERY_CACHE=.*/DISCOVERY_CACHE=false/' .env - composer update --no-interaction --prefer-dist --quiet - vendor/bin/phpbench run --tag=pr --store --ref=base --report=aggregate --progress=none --output=benchmark-comment | tee benchmark-result.txt || true + + - name: Install PR branch dependencies + timeout-minutes: 20 + run: composer update --no-interaction --prefer-dist --quiet + + - name: Benchmark PR branch + timeout-minutes: 70 + run: vendor/bin/phpbench run --tag=pr --store --ref=base --report=aggregate --progress=none --output=benchmark-comment | tee benchmark-result.txt || true - name: Prepare artifact run: |