Update README.md #102
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
name: PHP Linting | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
composer-install: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/ | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: zip | |
- name: Install Dependencies | |
env: | |
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}' | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
strategy: | |
max-parallel: 3 | |
matrix: | |
php-versions: ["8.1"] | |
php-linting-pint: | |
needs: | |
- composer-install | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/ | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Laravel code style check | |
run: ./vendor/bin/pint --test --preset laravel | |
strategy: | |
max-parallel: 3 | |
matrix: | |
php-versions: ["8.1"] | |
php-linting-psalm: | |
needs: | |
- composer-install | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/ | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Static analysis with Psalm | |
run: ./vendor/bin/psalm | |
strategy: | |
max-parallel: 3 | |
matrix: | |
php-versions: ["8.1"] | |
php-linting-stan: | |
needs: | |
- composer-install | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/ | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Static analysis with PHPStan | |
run: ./vendor/bin/phpstan analyse | |
strategy: | |
max-parallel: 3 | |
matrix: | |
php-versions: ["8.1"] |