infra: fix for benchmark CI #444
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
| name: SDK Benchmark Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| sdk-benchmarks: | |
| permissions: | |
| contents: write # required for pushing to gh-pages | |
| runs-on: oracle-bare-metal-64cpu-512gb-x86-64 | |
| steps: | |
| - name: Checkout Core Repo @ SHA - ${{ github.sha }} | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install tox-uv | |
| run: uv tool install --python-preference only-managed --python 3.13 tox-uv | |
| - name: Set up Python | |
| run: uv python install --python-preference only-managed 3.13 | |
| - name: Run tox | |
| run: tox -e benchmark-opentelemetry-sdk -- -k opentelemetry-sdk/benchmarks --benchmark-json=opentelemetry-sdk/output.json | |
| - name: Report on SDK benchmark results | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| name: OpenTelemetry Python SDK Benchmarks | |
| tool: pytest | |
| output-file-path: opentelemetry-sdk/output.json | |
| gh-pages-branch: gh-pages | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| # Make a commit on `gh-pages` with benchmarks from previous step | |
| benchmark-data-dir-path: "benchmarks" | |
| auto-push: true | |
| max-items-in-chart: 100 | |
| # Alert with a commit comment on possible performance regression | |
| alert-threshold: '200%' | |
| comment-on-alert: true |