Skip to content

Commit

Permalink
ci(github): php action allow do not install tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
LastDragon-ru committed Jan 21, 2024
1 parent bf3182d commit afe2eb5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/actions/php/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
with:
working-directory: ${{ env.WORKING_DIRECTORY }}
dependencies: false
tools: false

- name: Collect Settings
id: settings
Expand Down Expand Up @@ -111,6 +112,7 @@ jobs:
with:
version: ${{ matrix.php }}
dependencies: false
tools: false
working-directory: ${{ env.WORKING_DIRECTORY }}

# Required to resolve packages correctly.
Expand Down

0 comments on commit afe2eb5

Please sign in to comment.