Skip to content

Commit

Permalink
qa: add benchmark workflow
Browse files Browse the repository at this point in the history
Now that the master branch has the benchmark mechanism we can introduce
a workflow that compares the PR code performance against the targeted
branch.
  • Loading branch information
Baptouuuu authored Jan 20, 2025
1 parent 4ce996a commit 716c8b3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Benchmark
on: [pull_request]
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
env:
php-version: '8.3'
steps:
- name: Checkout target branch
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: ${{ env.php-extensions }}
ini-values: zend.assertions=1
coverage: none # Xdebug is installed by default, so we remove it manually

- uses: "ramsey/composer-install@v2"

- name: Creating a baseline benchmark from target branch
run: composer run-script benchmark-baseline

- name: Checkout PR code
uses: actions/checkout@v3
with:
clean: false

- uses: "ramsey/composer-install@v2"

- name: Compare the performances against the baseline
run: composer run-script benchmark-compare

0 comments on commit 716c8b3

Please sign in to comment.