fix(ci): restore benchmark-regression trigger to pull_request events in master.yml
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / e2e_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / helm (push) Waiting to run
CI / push-validation (push) Waiting to run
CI / status-check (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / benchmark-regression (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / e2e_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / helm (push) Waiting to run
CI / push-validation (push) Waiting to run
CI / status-check (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / benchmark-regression (push) Waiting to run
The benchmark-regression job was missing from master.yml entirely. Since master.yml triggers on both push and pull_request events, adding the job here with the guard if: forgejo.event_name == 'pull_request' ensures it runs on PRs. The job syncs prior ASV results from S3 (gracefully skips if credentials are not configured), runs nox -s benchmark_regression, and uploads the log as an artifact. It is intentionally NOT added to status-check's required needs list so that benchmark regressions are informational and do not block PR merges. ISSUES CLOSED: #10716
This commit was merged in pull request #10891.
This commit is contained in:
@@ -71,3 +71,56 @@ jobs:
|
||||
name: asv-results-pr
|
||||
path: /tmp/asv-results.tar
|
||||
retention-days: 30
|
||||
|
||||
benchmark-regression:
|
||||
# Runs benchmark regression on pull requests to detect performance regressions.
|
||||
# This job is informational only — it is NOT listed in status-check's required
|
||||
# needs, so a benchmark regression does not block PR merges.
|
||||
if: forgejo.event_name == 'pull_request'
|
||||
runs-on: docker-benchmark
|
||||
container: ${{vars.docker_prefix}}python:3.13-slim
|
||||
steps:
|
||||
- name: Install system dependencies (nodejs for checkout, git for ASV)
|
||||
run: |
|
||||
apt-get update && apt-get install -y -qq nodejs git curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Checkout full history
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install asv virtualenv uv=${{ env.UV_VERSION }} nox
|
||||
|
||||
- name: Sync prior benchmark results from S3
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||
ASV_S3_BUCKET: ${{ secrets.ASV_S3_BUCKET }}
|
||||
run: |
|
||||
if [ -n "${AWS_ACCESS_KEY_ID}" ] && [ -n "${ASV_S3_BUCKET}" ]; then
|
||||
python -m pip install awscli
|
||||
mkdir -p build/asv/results
|
||||
aws s3 sync "s3://${ASV_S3_BUCKET}/asv/results/" build/asv/results/ || echo "No existing results to sync"
|
||||
else
|
||||
echo "Skipping S3 sync - AWS credentials not configured"
|
||||
fi
|
||||
|
||||
- name: Run benchmark regression via nox
|
||||
env:
|
||||
NOX_DEFAULT_VENV_BACKEND: uv
|
||||
ASV_BASE_SHA: master
|
||||
run: |
|
||||
mkdir -p build
|
||||
nox -s benchmark_regression 2>&1 | tee build/nox-benchmark-regression-output.log
|
||||
|
||||
- name: Upload benchmark regression log artifact
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: benchmark-regression-logs
|
||||
path: build/nox-benchmark-regression-output.log
|
||||
retention-days: 30
|
||||
|
||||
@@ -5,6 +5,14 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- Restored `benchmark-regression` CI job to `master.yml` with `pull_request` trigger guard
|
||||
(`if: forgejo.event_name == 'pull_request'`). The job was previously absent from
|
||||
`master.yml`, causing benchmark regression testing to never run on PRs. The job is
|
||||
informational only and is not in `status-check`'s required needs list. (Closes #10716)
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
- **CI coverage job now waits for unit_tests** (#10714): Added `unit_tests` to the
|
||||
|
||||
Reference in New Issue
Block a user