-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |