From 08256f7071df27695cdcf21d9fa55bb614c13533 Mon Sep 17 00:00:00 2001 From: Sergio Brighenti Date: Tue, 27 Jun 2023 18:15:14 +0200 Subject: [PATCH] add psalm --- .github/workflows/php.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 5124fd4..8c7f2d2 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -21,4 +21,34 @@ jobs: run: composer install --no-progress - name: Run test suite - run: vendor/bin/pest --fail-on-warning \ No newline at end of file + run: vendor/bin/pest --fail-on-warning + static-analysis: + runs-on: ubuntu-latest + name: Psalm + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + coverage: none + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-8.1-${{ hashFiles('**/composer.json') }} + restore-keys: | + ${{ runner.os }}-php-8.1 + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --no-progress --no-ansi + + - name: Run Psalm + run: vendor/bin/psalm \ No newline at end of file