-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (36 loc) · 1.3 KB
/
code_standarts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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@v3
# Get composer cache directory
- id: get-composer-cache-directory
name: Get Composer caches directory path
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
shell: bash
# Mount composer cache directory
- id: mount-composer-cache-directory
name: Mount composer cache directory
uses: actions/cache@v3
with:
path: ${{ steps.get-composer-cache-directory.outputs.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