Skip to content

Commit 19ccfa3

Browse files
committed
added gha config
1 parent fa27a9d commit 19ccfa3

File tree

1 file changed

+44
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)