Skip to content

Commit c2f9ab4

Browse files
committed
Adding PHPBench
1 parent b87f94f commit c2f9ab4

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,62 @@ jobs:
256256
- name: "Upload Code Coverage"
257257
uses: "codecov/codecov-action@v1"
258258

259+
phpunit-phpbench:
260+
name: "PHPBench"
261+
runs-on: "ubuntu-latest"
262+
263+
strategy:
264+
matrix:
265+
php-version:
266+
- "7.4"
267+
268+
services:
269+
mysql:
270+
image: "mysql:8"
271+
env:
272+
MYSQL_ALLOW_EMPTY_PASSWORD: true
273+
MYSQL_ROOT_PASSWORD:
274+
ports:
275+
- "3306:3306"
276+
277+
steps:
278+
- name: "Checkout"
279+
uses: "actions/checkout@v2"
280+
with:
281+
fetch-depth: 0
282+
283+
- name: "Install PHP"
284+
uses: "shivammathur/setup-php@v2"
285+
with:
286+
php-version: "${{ matrix.php-version }}"
287+
extensions: ""
288+
coverage: "pcov"
289+
290+
- name: "Cache dependencies installed with composer"
291+
uses: "actions/cache@v1"
292+
with:
293+
path: "~/.composer/cache"
294+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
295+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
296+
297+
- name: "Install dependencies with composer"
298+
run: "composer install --no-interaction --no-progress --no-suggest"
299+
300+
- name: "Running PHPBench on current branch"
301+
run: "./phpbench.dist.sh run --tag=current_pr --store"
302+
303+
- name: "Switching to master branch"
304+
run: "git checkout master"
305+
306+
- name: "Updating dependencies"
307+
run: "composer update"
308+
309+
- name: "Running PHPBENCH on master branch for comparison"
310+
run: "./phpbench.dist.sh run --tag=master --store"
311+
312+
- name: "Generating comparison"
313+
run: "./phpbench.dist.sh report --uuid=tag:current_pr --uuid=tag:master --report='{extends: compare, compare: tag}'"
314+
259315
# phpunit-oci8:
260316
# name: "PHPUnit on OCI8"
261317
# runs-on: "ubuntu-latest"

0 commit comments

Comments
 (0)