-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
153 additions
and
59 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,23 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
|
||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
|
||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- bug | ||
- enhancement | ||
- RFC | ||
|
||
# Label to use when marking an issue as stale | ||
staleLabel: stale | ||
|
||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
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 |
---|---|---|
@@ -1,43 +1,99 @@ | ||
name: ci | ||
name: PHPUnit | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
push: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: [ '7.4', '8.0', '8.1', '8.2' ] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: php-setup | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: composer-validate | ||
run: composer validate | ||
|
||
- name: composer-cache | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.php-version }}-composer- | ||
- name: composer-install | ||
if: steps.composer-cache.outputs.cache-hit != 'true' | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
|
||
- name: phpunit | ||
run: vendor/bin/phpunit | ||
|
||
test: | ||
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}" | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.can-fail }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Lowest Deps 5.4 | ||
- php: lowest | ||
symfony: 5.4.* | ||
coverage: 'none' | ||
composer-flags: '--prefer-stable --prefer-lowest' | ||
can-fail: false | ||
# LTS with latest stable PHP 5.4 | ||
- php: latest | ||
symfony: 5.4.* | ||
coverage: 'none' | ||
composer-flags: '--prefer-stable' | ||
can-fail: false | ||
# LTS with latest stable PHP 6.4 | ||
- php: latest | ||
symfony: 6.4.* | ||
coverage: 'none' | ||
composer-flags: '--prefer-stable' | ||
can-fail: false | ||
# Active release | ||
- php: latest | ||
symfony: 7.0.* | ||
coverage: pcov | ||
composer-flags: '--prefer-stable' | ||
can-fail: false | ||
# Development release | ||
- php: nightly | ||
symfony: 7.1.*@dev | ||
coverage: 'none' | ||
composer-flags: '' | ||
can-fail: true | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2, flex | ||
coverage: ${{ matrix.coverage }} | ||
ini-values: date.timezone=UTC,memory_limit=-1,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1 | ||
env: | ||
fail-fast: true | ||
|
||
- name: Set Composer stability | ||
if: matrix.php == 'nightly' | ||
run: "composer config minimum-stability dev" | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer- | ||
|
||
- name: Install Composer dependencies | ||
run: composer update ${{ matrix.composer-flags }} --no-interaction --no-progress --optimize-autoloader | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
||
- name: Run tests | ||
run: composer test | ||
|
||
- name: Monitor coverage | ||
if: matrix.coverage != 'none' | ||
uses: slavcodev/coverage-monitor-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
coverage_path: coverage-report.xml | ||
threshold_alert: 60 | ||
threshold_warning: 80 |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
/.idea/ | ||
/var/ | ||
/vendor/ | ||
.DS_Store | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
composer.lock | ||
phpunit.xml | ||
coverage-report.xml |
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 |
---|---|---|
@@ -1,47 +1,58 @@ | ||
{ | ||
"name": "odandb/xhprof-bundle", | ||
"description": "This bundle add additional XHProf menu item in symfony debug toolbar & makes things easier to handle XHProf profiling", | ||
"license": "MIT", | ||
"type": "symfony-bundle", | ||
"keywords": [ | ||
"symfony", | ||
"bundle", | ||
"xhprof", | ||
"profiling", | ||
"debug", | ||
"tideways", | ||
"xhgui" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Mathieu Girard", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "OD&B", | ||
"homepage": "https://www.odandb.com/" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.4", | ||
"perftools/php-profiler": "^1.1", | ||
"symfony/config": "^5.4 || ^6.4 || ^7.0", | ||
"symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0", | ||
"symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", | ||
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0", | ||
"symfony/http-foundation": "^5.4 || ^6.4 || ^7.0", | ||
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0" | ||
}, | ||
"require-dev": { | ||
"symfony/phpunit-bridge": "^6.2" | ||
"phpunit/phpunit": "^9.5", | ||
"symfony/phpunit-bridge": "^7.0" | ||
}, | ||
"suggest": { | ||
"perftools/xhgui": "To view the profiling results in a web interface" | ||
}, | ||
"license": "MIT", | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Odandb\\XhprofBundle\\": "src/", | ||
"Odandb\\XhprofBundle\\Tests\\": "tests/" | ||
"Odandb\\XhprofBundle\\": "src/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Mathieu Girard", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "OD&B", | ||
"homepage": "https://www.odandb.com/" | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Odandb\\XhprofBundle\\Tests\\": "tests/" | ||
} | ||
] | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"scripts": { | ||
"test": "vendor/bin/phpunit --coverage-clover=coverage-report.xml" | ||
} | ||
} |
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