-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from dantleech/updated
General Update
- Loading branch information
Showing
22 changed files
with
562 additions
and
58 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,115 @@ | ||
name: "CI" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
fail-fast: true | ||
TZ: "Europe/Paris" | ||
|
||
jobs: | ||
php-cs-fixer: | ||
name: "PHP-CS-Fixer (${{ matrix.php-version }})" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- '7.3' | ||
|
||
steps: | ||
- | ||
name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
|
||
- | ||
name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: composer:v2 | ||
|
||
- | ||
name: "Composer install" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
composer-options: "--no-scripts" | ||
|
||
- | ||
name: "Run friendsofphp/php-cs-fixer" | ||
run: "vendor/bin/php-cs-fixer fix --dry-run --diff --verbose --allow-risky=yes" | ||
|
||
phpstan: | ||
name: "PHPStan (${{ matrix.php-version }})" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- '7.3' | ||
|
||
steps: | ||
- | ||
name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
|
||
- | ||
name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: composer:v2 | ||
|
||
- | ||
name: "Composer install" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
composer-options: "--no-scripts" | ||
|
||
- | ||
name: "Run PHPStan" | ||
run: "vendor/bin/phpstan analyse" | ||
phpunit: | ||
name: "PHPUnit (${{ matrix.php-version }})" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- '7.3' | ||
- '7.4' | ||
- '8.0' | ||
|
||
steps: | ||
- | ||
name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
- | ||
name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: composer:v2 | ||
- | ||
name: "Remove BOX" | ||
run: "composer remove humbug/box --no-update --dev" | ||
- | ||
name: "Composer install" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
composer-options: "--no-scripts" | ||
- | ||
name: "Run PHPUnit" | ||
run: "vendor/bin/phpunit" |
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,38 @@ | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
name: Append phpbench.phar to release | ||
|
||
jobs: | ||
build: | ||
name: Compile and upload Phar | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set PHP 7.3 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.3' | ||
|
||
- name: Compile phpbench.phar | ||
run: | | ||
composer install | ||
wget https://github.com/box-project/box/releases/download/3.9.1/box.phar | ||
php box.phar compile -c box.json.gh-release | ||
- name: Check existence of compiled .phar | ||
run: test -e fink.phar && exit 0 || exit 10 | ||
|
||
- name: Upload to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./phpbench.phar | ||
asset_name: phpbench.phar | ||
asset_content_type: application/octet-stream |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.