Skip to content

build(deps): bump actions/checkout from 5.0.0 to 6.0.1 #327

build(deps): bump actions/checkout from 5.0.0 to 6.0.1

build(deps): bump actions/checkout from 5.0.0 to 6.0.1 #327

Workflow file for this run

name: Code quality
on:
pull_request:
paths:
- "**.php"
- "phpcs.xml"
- ".github/workflows/code-quality.yml"
push:
branches: main
paths:
- "**.php"
- "phpcs.xml"
- ".github/workflows/code-quality.yml"
permissions:
contents: read
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: '8.2'
- name: Get composer cache directory
id: composer-cache
shell: bash
run: |
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache composer cache directory
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: "Validate composer.json and composer.lock"
run: composer validate --strict
- name: Install dependencies with composer
run: composer install --prefer-dist
- name: Run PHPStan
run: composer lint-phpstan
phpcs:
name: phpcs
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: '8.2'
tools: cs2pr
- name: Get composer cache directory
id: composer-cache
shell: bash
run: |
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache composer cache directory
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies with composer
run: composer install --prefer-dist
- name: Run phpcs
run: composer lint-phpcs-action