Skip to content

Actions got structured #13

Actions got structured

Actions got structured #13

Workflow file for this run

name: PHP Code Styles
env:
COMPOSER_VER: "2.7.9"
PHP_VER: "8.0"
on:
push:
branches: [ "master", "main", "dev" ]
pull_request:
types: [synchronize, opened, reopened]
jobs:
php-cs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
steps:
- uses: actions/checkout@v3
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
with:
php_version: ${{ env.PHP_VER }}
version: ${{ env.COMPOSER_VER }}
- name: Get PHPCS Cache
id: phpcs-cache
run: |
echo "file=.phpcs.cache" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.phpcs-cache.outputs.file }}
key: ${{ runner.os }}-phpcs-${{ hashFiles('**/.phpcs.cache') }}
restore-keys: |
${{ runner.os }}-phpcs-
- name: Run PHPCS
run: composer run phpcs