-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
But keep it only for PHP 8 because GA doesn't have an "allow failure" feature
- Loading branch information
Showing
6 changed files
with
440 additions
and
46 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
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,9 +1,10 @@ | ||
/.github export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.php_cs export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.travis.yml export-ignore | ||
/phpunit.xml export-ignore | ||
/tests export-ignore | ||
/phpstan.neon export-ignore |
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,56 @@ | ||
name: "CS" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
coding-standards: | ||
name: "CS Fixer & PHPStan" | ||
runs-on: "ubuntu-18.04" | ||
|
||
strategy: | ||
matrix: | ||
php: | ||
- "7.3" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php }}" | ||
tools: cs2pr, composer:v1 | ||
ini-values: "date.timezone=Europe/Paris" | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: "Cache dependencies installed with Composer" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: "php-${{ matrix.php }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php }}-composer-locked-" | ||
|
||
- name: "Install dependencies with Composer" | ||
run: "composer install --no-interaction --optimize-autoloader --no-progress --prefer-dist" | ||
|
||
- name: "Run PHP CS Fixer" | ||
run: "php vendor/bin/php-cs-fixer fix --verbose --dry-run --format=checkstyle | cs2pr" | ||
|
||
- name: "Install PHPUnit for PHPStan" | ||
run: "php vendor/bin/simple-phpunit install" | ||
|
||
- name: "Run PHPStan" | ||
run: "php vendor/bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr" |
Oops, something went wrong.