-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (82 loc) · 2.53 KB
/
code-analysis.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Code Analysis
# https://github.com/shivammathur/setup-php
on:
push:
branches-ignore: [ rc** ]
pull_request:
branches-ignore: [ master ]
jobs:
githooks:
name: GitHooks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.1']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
tools/tmp/resultCache.php #Phpstan cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-
- name: Install dependencies
run: |
chmod -R +x tools/*
tools/composer install --prefer-dist --no-progress
- name: Execute GitHooks
run: php githooks tool all full
# Code_Analysis:
# name: Code Analysis
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# php-versions: ['7.1']
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Install PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ matrix.php-versions }}
# - name: Cache dependencies
# uses: actions/cache@v4
# with:
# path: |
# tools/tmp/resultCache.php #Phpstan cache
# /home/runner/.cache/composer/files
# key: ${{ runner.os }}-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json') }}
# restore-keys: |
# ${{ runner.os }}-
# - name: Install dependencies
# run: |
# chmod -R +x tools/*
# tools/composer install --prefer-dist --no-progress
# - name: Execute PhpStan
# id: phpstan
# run: php githooks tool phpstan
# continue-on-error: true
# - name: Execute Php Mess Detector
# id: phpmd
# run: php githooks tool phpmd
# continue-on-error: true
# - name: Execute Php Code Sniffer
# id: phpcs
# run: php githooks tool phpcs
# continue-on-error: true
# - name: Check on failures
# if: steps.phpstan.outcome != 'success' || steps.phpmd.outcome != 'success' || steps.phpcs.outcome != 'success'
# run: exit 1