mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Merge pull request #130 from GrahamCampbell/patch-1
Cleanup actions static analysis
This commit is contained in:
46
.github/workflows/formats.yml
vendored
46
.github/workflows/formats.yml
vendored
@ -1,46 +0,0 @@
|
|||||||
name: Formats
|
|
||||||
|
|
||||||
on: ['push', 'pull_request']
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
php: [7.4]
|
|
||||||
dependency-version: [prefer-lowest, prefer-stable]
|
|
||||||
|
|
||||||
name: Formats P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Cache dependencies
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.composer/cache/files
|
|
||||||
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
|
||||||
|
|
||||||
- name: Setup PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php }}
|
|
||||||
extensions: dom, mbstring, zip
|
|
||||||
tools: prestissimo
|
|
||||||
coverage: pcov
|
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
|
||||||
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
|
|
||||||
|
|
||||||
- name: Coding Style Checks
|
|
||||||
run: |
|
|
||||||
vendor/bin/rector process src --dry-run
|
|
||||||
vendor/bin/php-cs-fixer fix -v --dry-run
|
|
||||||
|
|
||||||
- name: Type Checks
|
|
||||||
run: vendor/bin/phpstan analyse --ansi
|
|
||||||
54
.github/workflows/static.yml
vendored
Normal file
54
.github/workflows/static.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
name: Static Analysis
|
||||||
|
|
||||||
|
on: ['push', 'pull_request']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
name: Code Style
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: 7.4
|
||||||
|
tools: composer:v2
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: composer update --no-interaction --prefer-dist --no-progress
|
||||||
|
|
||||||
|
- name: Run Rector
|
||||||
|
run: vendor/bin/rector process src --dry-run
|
||||||
|
|
||||||
|
- name: Run PHP-CS-Fixer
|
||||||
|
run: vendor/bin/php-cs-fixer fix -v --allow-risky=yes --dry-run
|
||||||
|
|
||||||
|
phpstan:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
dependency-version: [prefer-lowest, prefer-stable]
|
||||||
|
|
||||||
|
name: PHPStan ${{ matrix.dependency-version }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: 7.4
|
||||||
|
tools: composer:v2
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: composer update --prefer-stable --no-interaction --prefer-dist --no-progress
|
||||||
|
|
||||||
|
- name: Run PHPStan
|
||||||
|
run: vendor/bin/phpstan analyse --no-progress
|
||||||
Reference in New Issue
Block a user