From 1472cfc690bba470ba895f035282aa0e23c4f48a Mon Sep 17 00:00:00 2001 From: Dmitry Merkushin Date: Wed, 16 Aug 2023 19:33:32 +0200 Subject: [PATCH] Add Psalm workflow, running the check on PHP 7.3 & 8.2 --- .github/workflows/psalm.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/psalm.yml diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 0000000000..f73a6d3922 --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,47 @@ +name: Psalm Test + +on: + pull_request: + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + name: Psalm + runs-on: ubuntu-latest + strategy: + fail-fast: true + max-parallel: 10 + matrix: + php: ['7.3', '8.2'] + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get cached composer directories + uses: actions/cache@v3 + with: + path: ~/.cache/composer/ + key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + - uses: actions/cache@v3 + with: + path: vendor/ + key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer + coverage: none + + - name: Install + run: composer install --no-ansi --no-interaction --prefer-dist --no-progress + + - name: Run Psalm + run: ./vendor/bin/psalm \ No newline at end of file