-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (42 loc) · 1.53 KB
/
static-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Statische Code-Analyse
permissions:
contents: read
packages: read
on:
push:
branches:
- master
pull_request:
env:
PHP_VERSION: 8.3
PSALM_VERSION: 5.25.0
jobs:
Psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
tools: composer:v2
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor
key: composer-${{ runner.os }}-${{ env.PHP_VERSION }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-${{ runner.os }}-${{ env.PHP_VERSION }}-
composer-${{ runner.os }}-
- run: |
composer install --no-interaction --no-progress --ansi --no-scripts
composer show
- name: Restore Psalm cache
uses: actions/cache@v4
with:
path: /home/runner/.cache/psalm
key: psalm-${{ env.PSALM_VERSION }}-${{ env.PHP_VERSION }}
- name: Run Psalm
run: |
docker pull --quiet ghcr.io/webfactory/psalm:$PSALM_VERSION
docker run --tty -v $(pwd):/app -v $HOME/cache:/cache ghcr.io/webfactory/psalm:$PSALM_VERSION --show-info=false --stats --output-format=github