Skip to content

Commit

Permalink
Fix benchmarks (#810)
Browse files Browse the repository at this point in the history
Running it on . caused exceptions for unrecognized PHPDoc annotations.
  • Loading branch information
spawnia committed Mar 28, 2021
1 parent cb3211e commit f93879b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/ci.yml
Expand Up @@ -20,10 +20,9 @@ jobs:
- "8.0"
dependencies:
- "highest"
env: [
'',
'EXECUTOR=coroutine',
]
env:
- ''
- 'EXECUTOR=coroutine'
include:
- dependencies: "lowest"
php-version: "7.4"
Expand All @@ -41,12 +40,6 @@ jobs:
coverage: "pcov"
ini-values: "zend.assertions=1"

- name: Remove dependencies not used in this job for PHP 8 compatibility
run: |
composer remove --dev --no-update doctrine/coding-standard
composer remove --dev --no-update phpbench/phpbench
if: ${{ matrix.php-version == '8.0'}}

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
Expand Down Expand Up @@ -84,3 +77,23 @@ jobs:
uses: "codecov/codecov-action@v1"
with:
directory: reports

benchmarks:
name: "Benchmarks"
runs-on: "ubuntu-20.04"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
coverage: "none"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"

- name: "Run PHPBench"
run: "composer bench"
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -18,7 +18,7 @@
"doctrine/coding-standard": "^8.2",
"ergebnis/composer-normalize": "^2.13",
"nyholm/psr7": "^1.2",
"phpbench/phpbench": "^0.16.10",
"phpbench/phpbench": "^1.0.0-alpha7",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "0.12.82",
"phpstan/phpstan-phpunit": "0.12.18",
Expand Down Expand Up @@ -50,7 +50,7 @@
"scripts": {
"api-docs": "php tools/gendocs.php",
"baseline": "phpstan --ansi --generate-baseline",
"bench": "phpbench run .",
"bench": "phpbench run",
"check": "composer lint && composer stan && composer test",
"fix": "phpcbf",
"lint": "phpcs",
Expand Down

0 comments on commit f93879b

Please sign in to comment.