github-actions(deps): bump actions/checkout from 2 to 4 #15
Workflow file for this run
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
on: | |
pull_request: ~ | |
push: ~ | |
name: Static analysis | |
jobs: | |
phpstan: | |
name: PHPStan | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: [7.4] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: intl | |
php-version: ${{ matrix.php-version }} | |
- name: Determine composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=directory::$(composer config cache-dir)" | |
- name: Cache dependencies installed with composer | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.directory }} | |
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} | |
restore-keys: | | |
composer-${{ runner.os }}-${{ matrix.php-version }}- | |
composer-${{ runner.os }}- | |
composer- | |
- name: Download dependencies | |
run: | | |
composer update --no-interaction --no-progress --optimize-autoloader | |
composer bin phpstan install --no-interaction --no-progress --optimize-autoloader | |
- name: Run PHPStan | |
run: | | |
vendor/bin/phpstan analyze --no-progress | |
psalm: | |
name: Psalm | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: [7.4] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install PHP with extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: intl | |
php-version: ${{ matrix.php-version }} | |
- name: Determine composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=directory::$(composer config cache-dir)" | |
- name: Cache dependencies installed with composer | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.directory }} | |
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} | |
restore-keys: | | |
composer-${{ runner.os }}-${{ matrix.php-version }}- | |
composer-${{ runner.os }}- | |
composer- | |
- name: Download dependencies | |
run: | | |
composer update --no-interaction --no-progress --optimize-autoloader | |
composer bin psalm install --no-interaction --no-progress --optimize-autoloader | |
- name: Run Psalm | |
run: | | |
vendor/bin/psalm --no-progress --output-format=github --shepherd | |
php-cs-fixer: | |
name: php-cs-fixer | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- 7.1 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: intl | |
php-version: ${{ matrix.php-version }} | |
- name: Determine composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=directory::$(composer config cache-dir)" | |
- name: Cache dependencies installed with composer | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.directory }} | |
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} | |
restore-keys: | | |
composer-${{ runner.os }}-${{ matrix.php-version }}- | |
composer-${{ runner.os }}- | |
composer- | |
- name: Download dependencies | |
run: | | |
composer update --no-interaction --no-progress --optimize-autoloader | |
composer bin php-cs-fixer install --no-interaction --no-progress --optimize-autoloader | |
- name: Cache cache file for php-cs-fixer | |
uses: actions/cache@v2 | |
with: | |
path: .php_cs.cache | |
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} | |
restore-keys: | | |
composer-${{ runner.os }}-${{ matrix.php-version }}- | |
composer-${{ runner.os }}- | |
composer- | |
- name: Run php-cs-fixer | |
run: | | |
vendor/bin/php-cs-fixer fix --diff --diff-format=udiff --dry-run --verbose |