From 1009a8c9e61413f72c357618f045dbf74947aec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=F0=9F=A5=B7=F0=9F=8F=BB?= Date: Thu, 20 Nov 2025 11:23:00 +0100 Subject: [PATCH 1/2] chore: adjust github actions for php 8.4 --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bb93b22..ea79c2b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -30,7 +30,7 @@ jobs: run: sudo sed -ri 's/^#? StrictHostKeyChecking ask/StrictHostKeyChecking no/g' /etc/ssh/ssh_config - name: Cache dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.composer/cache/files key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} From 23640bbaa6d2245fdcf0bbfadaa050ec78a1c712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=F0=9F=A5=B7=F0=9F=8F=BB?= Date: Thu, 20 Nov 2025 11:35:22 +0100 Subject: [PATCH 2/2] chore: adjust github actions for php 8.4 --- .github/workflows/run-tests.yml | 61 ++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ea79c2b..902c1a0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,22 +1,20 @@ -name: run-tests - -on: [push, pull_request] +name: Pest Tests +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] jobs: - test: - + tests: runs-on: ubuntu-latest strategy: - fail-fast: true matrix: - php: [8.4] - dependency-version: [prefer-lowest, prefer-stable] - - name: P${{ matrix.php }} - ${{ matrix.dependency-version }} + php-version: ['8.4'] steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Install sed run: sudo apt-get install sed @@ -29,21 +27,38 @@ jobs: - name: Patch SSH Daemon run: sudo sed -ri 's/^#? StrictHostKeyChecking ask/StrictHostKeyChecking no/g' /etc/ssh/ssh_config - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache/files - key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none + php-version: ${{ matrix.php-version }} + extensions: mbstring, dom, fileinfo, mysql, redis + coverage: xdebug + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v4 + with: + path: vendor + key: ${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php-${{ matrix.php-version }}-composer- - name: Install dependencies - run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + run: composer install --prefer-dist --no-progress --no-suggest - - name: Execute tests - run: vendor/bin/pest + - name: Run PEST tests + run: composer run test + + - name: Run PEST with coverage + if: matrix.php-version == '8.4' + run: composer run test:coverage-clover + + - name: Upload coverage reports to Coveralls + if: matrix.php-version == '8.4' + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + file: ./coverage/clover.xml