-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (36 loc) · 952 Bytes
/
_static-analysis.yml
File metadata and controls
44 lines (36 loc) · 952 Bytes
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: Static Analysis
on:
workflow_call:
jobs:
static-check:
name: Run Static Analysis
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.1"]
steps:
- uses: actions/checkout@v4
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ./vendor
key: ${{ runner.os }}-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}
- name: Install dependencies
run: |
composer install
- name: Run CS Fixer
run: |
./vendor/bin/php-cs-fixer check ./src
- name: Setup Code Sniffer
run: |
./vendor/bin/phpcs --config-set default_standard PSR12
- name: Run Code Sniffer
run: |
./vendor/bin/phpcs -n ./src/