diff --git a/.github/actions/php/prepare/action.yaml b/.github/actions/php/prepare/action.yaml index 9197b3ce..40fb37af 100644 --- a/.github/actions/php/prepare/action.yaml +++ b/.github/actions/php/prepare/action.yaml @@ -10,6 +10,10 @@ inputs: description: 'PHP Extensions' required: false default: 'apcu, amqp, protobuf, intl, gmp, sockets, zip, opcache, pdo_pgsql' + work-directory: + description: 'Working Directory' + required: false + default: '.' runs: using: composite @@ -21,10 +25,12 @@ runs: php-version: ${{ inputs.php }} - name: Validate Composer + working-directory: ${{ inputs.work-directory }} shell: bash run: composer validate - name: Get Composer Cache Directory + working-directory: ${{ inputs.work-directory }} shell: bash id: composer-cache run: | @@ -44,4 +50,5 @@ runs: timeout_minutes: 5 max_attempts: 3 command: | + cd ${{ inputs.work-directory }} composer install --prefer-dist --no-interaction --no-progress diff --git a/.github/workflows/reusable-php-checks-v2.yaml b/.github/workflows/reusable-php-checks-v2.yaml index ed63fcae..3e1f94bb 100644 --- a/.github/workflows/reusable-php-checks-v2.yaml +++ b/.github/workflows/reusable-php-checks-v2.yaml @@ -26,11 +26,15 @@ jobs: git config --global core.eol lf - uses: rees46/workflow/.github/actions/php/prepare@master + with: + working-directory: ${{ inputs.working-directory }} - name: Composer Audit + working-directory: ${{ inputs.working-directory }} run: composer audit - name: Security Advisories + working-directory: ${{ inputs.working-directory }} run: composer require --dev roave/security-advisories:dev-latest phpstan: @@ -50,8 +54,11 @@ jobs: git config --global core.eol lf - uses: rees46/workflow/.github/actions/php/prepare@master + with: + working-directory: ${{ inputs.working-directory }} - name: Static Analysis + working-directory: ${{ inputs.working-directory }} run: composer linter:check -- --error-format=github --ansi php-cs-fixer: @@ -71,8 +78,11 @@ jobs: git config --global core.eol lf - uses: rees46/workflow/.github/actions/php/prepare@master + with: + working-directory: ${{ inputs.working-directory }} - name: Check Code Style + working-directory: ${{ inputs.working-directory }} run: composer phpcs:check tests: @@ -109,15 +119,21 @@ jobs: git config --global core.eol lf - uses: rees46/workflow/.github/actions/php/prepare@master + with: + working-directory: ${{ inputs.working-directory }} - name: Symfony Container Tests + working-directory: ${{ inputs.working-directory }} run: composer test:container - name: Unit Tests + working-directory: ${{ inputs.working-directory }} run: composer test:unit - name: Integration Tests + working-directory: ${{ inputs.working-directory }} run: composer test:integration - name: Functional Tests + working-directory: ${{ inputs.working-directory }} run: composer test:feature