Skip to content

Commit 2e181a1

Browse files
committed
added workflow config
1 parent ec11fdf commit 2e181a1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Static Analysis
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- .github/workflows/static-analysis.yml
9+
- composer.*
10+
- lib/**
11+
- phpstan*
12+
13+
push:
14+
branches:
15+
- master
16+
paths:
17+
- .github/workflows/static-analysis.yml
18+
- composer.*
19+
- lib/**
20+
- phpstan*
21+
22+
jobs:
23+
static-analysis-phpstan:
24+
name: Static Analysis with PHPStan
25+
runs-on: ubuntu-22.04
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Install PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
coverage: none
35+
php-version: 8.3
36+
tools: cs2pr
37+
38+
- name: Install dependencies with Composer
39+
uses: ramsey/composer-install@v2
40+
41+
- name: Run static analysis with phpstan/phpstan
42+
run: vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr
43+

0 commit comments

Comments
 (0)