Skip to content

Commit 33dced2

Browse files
authored
Add static-analysis GitHub workflow (#229)
1 parent f3c2dfd commit 33dced2

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: static analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- '*.x'
8+
pull_request:
9+
10+
jobs:
11+
types:
12+
runs-on: ubuntu-22.04
13+
14+
strategy:
15+
fail-fast: true
16+
17+
name: Source Code
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: 8.1
27+
tools: composer:v2
28+
coverage: none
29+
30+
- name: Install dependencies
31+
uses: nick-fields/retry@v2
32+
with:
33+
timeout_minutes: 5
34+
max_attempts: 5
35+
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
36+
37+
- name: Execute type checking
38+
run: vendor/bin/phpstan --configuration=".phpstan.neon"

.phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ parameters:
22
level: 1
33
paths:
44
- src
5-
- tests
65
ignoreErrors:
76
- path: tests/database/factories/*
87
message: '#Variable \$factory might not be defined.#'

0 commit comments

Comments
 (0)