From b6ceeec9a34cbf3290b875288b3b97320cff10cd Mon Sep 17 00:00:00 2001 From: Hasbi Ashshidiq Date: Tue, 2 Dec 2025 14:57:13 +0700 Subject: [PATCH 1/2] chore: integrate `setup-php` and update workflow for Composer and PHPUnit commands --- .github/workflows/pull-request-check.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request-check.yml b/.github/workflows/pull-request-check.yml index a204bb08..deb6a3b7 100644 --- a/.github/workflows/pull-request-check.yml +++ b/.github/workflows/pull-request-check.yml @@ -9,6 +9,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: composer, phpunit:9.6 + coverage: none + - name: Cache Composer dependencies uses: actions/cache@v3 with: @@ -16,13 +23,7 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('composer.lock') }} - name: Installing dependencies - uses: php-actions/composer@v6 - with: - php_version: 8.2 + run: composer install --no-interaction --no-progress --prefer-dist - name: Running unit test - uses: php-actions/phpunit@v3 - with: - version: 9.6 - php_version: 8.2 - configuration: phpunit.xml + run: phpunit --configuration phpunit.xml From cabfc0d36e4dd7244463eef3d7b3c3d281085c81 Mon Sep 17 00:00:00 2001 From: Hasbi Ashshidiq Date: Tue, 2 Dec 2025 15:18:00 +0700 Subject: [PATCH 2/2] chore: run php unit from vendor/bin --- .github/workflows/pull-request-check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-check.yml b/.github/workflows/pull-request-check.yml index deb6a3b7..e58547db 100644 --- a/.github/workflows/pull-request-check.yml +++ b/.github/workflows/pull-request-check.yml @@ -13,7 +13,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: '8.2' - tools: composer, phpunit:9.6 + tools: composer coverage: none - name: Cache Composer dependencies @@ -23,7 +23,9 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('composer.lock') }} - name: Installing dependencies + env: + COMPOSER_CACHE_DIR: /tmp/composer-cache run: composer install --no-interaction --no-progress --prefer-dist - name: Running unit test - run: phpunit --configuration phpunit.xml + run: vendor/bin/phpunit --configuration phpunit.xml