Skip to content

Commit 61d286d

Browse files
committed
Run PHPStan in GitHub Actions
1 parent 48ddcfd commit 61d286d

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ charset = utf-8
77
trim_trailing_whitespace = true
88
indent_style = space
99
indent_size = 4
10+
11+
[*.yml]
12+
indent_size = 2

.github/workflows/phpstan.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PHPStan
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
phpstan:
11+
name: "PHPStan"
12+
runs-on: "ubuntu-latest"
13+
timeout-minutes: 30
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-version:
19+
- "7.4"
20+
- "8.0"
21+
22+
steps:
23+
- name: "Checkout"
24+
uses: "actions/checkout@v2"
25+
26+
- name: "Install PHP"
27+
uses: "shivammathur/setup-php@v2"
28+
with:
29+
coverage: "none"
30+
php-version: "${{ matrix.php-version }}"
31+
extensions: mbstring
32+
33+
- name: "Install dependencies"
34+
run: "composer install --no-interaction --no-progress --no-suggest"
35+
36+
- name: "PHPStan"
37+
run: "vendor/bin/phpstan"

0 commit comments

Comments
 (0)