Skip to content

Static Analysis

Static Analysis #15

name: "Static Analysis"
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
sa-phpstan:
runs-on: ubuntu-20.04
name: PHPStan
steps:
-
uses: actions/checkout@v3
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
extensions: intl
tools: composer:v2,flex
coverage: none
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
-
name: Install PHP dependencies
run: composer update --no-interaction
env:
SYMFONY_REQUIRE: "5.4.*"
-
name: Run PHPStan
run: vendor/bin/phpstan analyse --error-format=github
sa-psalm:
runs-on: ubuntu-20.04
name: Psalm
steps:
-
uses: actions/checkout@v3
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
extensions: intl
tools: composer:v2,flex
coverage: none
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
-
name: Install PHP dependencies
run: composer update --no-interaction
env:
SYMFONY_REQUIRE: "5.4.*"
-
name: Run Psalm
run: vendor/bin/psalm --output-format=github