Skip to content

Commit e0306fc

Browse files
committed
chore: adds phpstan workflow
1 parent c414e0d commit e0306fc

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/phpstan.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'PHPStan'
2+
on:
3+
push:
4+
jobs:
5+
phpstan:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout the repository
9+
uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 1
12+
# ------------------------------------------------------------------------------
13+
# Prepare our composer cache directory
14+
# ------------------------------------------------------------------------------
15+
- name: Get Composer Cache Directory
16+
id: get-composer-cache-dir
17+
run: |
18+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
19+
- uses: actions/cache@v4
20+
id: composer-cache
21+
with:
22+
path: ${{ steps.get-composer-cache-dir.outputs.dir }}
23+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-composer-
26+
# ------------------------------------------------------------------------------
27+
# Install dependencies
28+
# ------------------------------------------------------------------------------
29+
- name: Install dependencies
30+
run: composer install --ignore-platform-reqs --no-interaction
31+
# ------------------------------------------------------------------------------
32+
# Run PHPStan
33+
# ------------------------------------------------------------------------------
34+
- name: Run PHPStan
35+
run: composer phpstan

0 commit comments

Comments
 (0)