Skip to content

Commit 82884b1

Browse files
committed
feat: Add code-analysis.yaml GitHub action
1 parent 35b5287 commit 82884b1

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Code Analysis
2+
3+
on:
4+
pull_request: null
5+
push:
6+
branches:
7+
- develop-v5
8+
workflow_dispatch:
9+
permissions:
10+
contents: read
11+
jobs:
12+
code_analysis:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
actions:
17+
- name: 'PHPStan'
18+
run: composer phpstan
19+
- name: 'Coding Standards'
20+
run: composer fix-cs
21+
name: ${{ matrix.actions.name }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Cache Composer dependencies
26+
uses: actions/cache@v4
27+
with:
28+
path: /tmp/composer-cache
29+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
30+
- name: Setup PHP
31+
id: setup-php
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: 8.2
35+
extensions: 'ctype,curl,dom,iconv,imagick,intl,json,mbstring,openssl,pcre,pdo,reflection,spl,zip'
36+
ini-values: post_max_size=256M, max_execution_time=180, memory_limit=512M
37+
tools: composer:v2
38+
- name: Install Composer dependencies
39+
run: composer install --no-interaction --no-ansi --no-progress
40+
- run: ${{ matrix.actions.run }}

0 commit comments

Comments
 (0)