Skip to content

Check code standarts #228

Check code standarts

Check code standarts #228

name: Check code standarts
run-name: Check code standarts
on:
pull_request:
types: [ opened, reopened, synchronize ]
branches: [ "master", "dev" ]
permissions:
contents: write
jobs:
code_standarts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Composer caches directory path
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
shell: bash
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
${{ runner.os }}-composer-
# Install composer deps, if .lock file was changed
- id: install-composer-dependencies
name: Install composer dependencies
run: composer install --prefer-dist --no-progress
shell: bash
- name: PHP Code Standarts
run: |
chmod +x ./bin/phpcs.sh
./bin/phpcs.sh -full
shell: bash