From afe2eb52bc1f247715fa4c89f54f50cddb144b3a Mon Sep 17 00:00:00 2001 From: Aleksei Lebedev <1329824+LastDragon-ru@users.noreply.github.com> Date: Sat, 20 Jan 2024 19:16:08 +0400 Subject: [PATCH] ci(github): `php` action allow do not install tools. --- .github/actions/php/action.yml | 12 ++++++++++++ .github/workflows/phpunit.yml | 2 ++ 2 files changed, 14 insertions(+) diff --git a/.github/actions/php/action.yml b/.github/actions/php/action.yml index 761433da8..db1c0557b 100644 --- a/.github/actions/php/action.yml +++ b/.github/actions/php/action.yml @@ -16,6 +16,11 @@ inputs: required: false type: string default: "" + tools: + description: "Should tools be installed via composer or not (default `true`)" + required: false + type: boolean + default: true runs: using: composite @@ -43,6 +48,13 @@ runs: coverage: none tools: cs2pr + - name: Disable tools + if: ${{ !(inputs.tools == 'true' || inputs.tools == 1) }} # https://github.com/actions/runner/issues/1483 + shell: bash + working-directory: ${{ inputs.working-directory }} + run: | + composer remove --no-interaction --no-progress --ansi --no-update --dev "bamarni/composer-bin-plugin" + - name: Install dependencies if: ${{ inputs.dependencies == 'true' || inputs.dependencies == 1 }} # https://github.com/actions/runner/issues/1483 uses: ramsey/composer-install@v2 diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 1b1221e10..e5f1c9d61 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -48,6 +48,7 @@ jobs: with: working-directory: ${{ env.WORKING_DIRECTORY }} dependencies: false + tools: false - name: Collect Settings id: settings @@ -111,6 +112,7 @@ jobs: with: version: ${{ matrix.php }} dependencies: false + tools: false working-directory: ${{ env.WORKING_DIRECTORY }} # Required to resolve packages correctly.