From bcaabde92700ac69831b7d74ee142269e2e5574d Mon Sep 17 00:00:00 2001 From: Andreas Heigl Date: Sat, 19 Oct 2024 19:23:52 +0200 Subject: [PATCH] Remove psalm from most installations As Psalm is only used in one single job it can be removed in general and then reinstalled when it is actually required before it is executed. This process allows to keep Psalm in the dev-dependencies so that constributors still have it available but in CI-runs it needs not to be installed when it is not executed. (cherry picked from commit 42c84764455b8f151b132d5b32d07e7bc0bdce5c) --- .github/actions/setup-build/action.yaml | 4 ++++ .github/workflows/ci.yaml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-build/action.yaml b/.github/actions/setup-build/action.yaml index 11a266b9..2883f25a 100644 --- a/.github/actions/setup-build/action.yaml +++ b/.github/actions/setup-build/action.yaml @@ -62,6 +62,10 @@ runs: shell: bash run: composer require ${{ inputs.composer-require }} --dev --no-update --working-dir=${{ inputs.composer-working-dir }} + - name: "Remove Psalm from dependencies" + shell: bash + run: composer remove --dev vimeo/psalm + - name: "Validate composer.json" shell: bash run: composer validate --no-check-publish --no-check-lock --working-dir=${{ inputs.composer-working-dir }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 16540c7e..1ccafa74 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,7 +36,9 @@ jobs: - name: "Psalm" if: always() - run: vendor/bin/psalm + run: | + composer require -W --dev vimeo/psalm:^5.0 + vendor/bin/psalm unit-tests: name: "Unit Tests - PHP ${{ matrix.php-version }}, Sf ${{ matrix.symfony-version }}${{ matrix.dependency-versions && format(', Deps: {0}', matrix.dependency-versions) }}"