chore(deps): Bump actions/setup-python from 5 to 6 #194
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2026 LibreSign | |
| # SPDX-License-Identifier: AGPL-3.0-or-later | |
| name: performance | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| performance: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect minimum PHP from composer.json | |
| id: php_min | |
| run: | | |
| php_version=$(grep -Po '"php"\s*:\s*"\K[^"]+' composer.json | grep -Eo '[0-9]+\.[0-9]+' | head -n1) | |
| [[ -n "$php_version" ]] || { echo "Could not determine minimum PHP version"; exit 1; } | |
| echo "version=$php_version" >> "$GITHUB_OUTPUT" | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ steps.php_min.outputs.version }} | |
| coverage: none | |
| - run: composer install --no-interaction --prefer-dist | |
| - run: composer bin all install --no-interaction --prefer-dist | |
| - name: Run benchmarks (strict CI mode with verbose output) | |
| run: | | |
| composer benchmark:run:ci | |
| echo "✓ Benchmarks completed" | |
| echo "" | |
| echo "Results saved to build/benchmark-results.xml" | |
| echo "Review: Ensure no individual benchmark takes >10ms average" | |
| - name: Validate regression against baseline | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| if composer benchmark:baseline:exists; then | |
| composer benchmark:baseline:check | |
| else | |
| echo "No 'baseline' tag found in phpbench storage. Skipping baseline comparison." | |
| echo "Run 'composer benchmark:baseline:update' and commit .github/.performance/.phpbench to enable regression gate." | |
| fi | |
| - name: Save benchmark results as artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: build/benchmark-results.xml | |
| retention-days: 90 |