From 7c19d9cd02447d8e2a10a850442b5217dfd2918b Mon Sep 17 00:00:00 2001 From: Swapnil Sarwe Date: Mon, 1 Jul 2024 20:32:56 +0530 Subject: [PATCH 1/2] laravel 11 support dependency matrix update in test action phpunit.xml update with latest changes --- .github/workflows/php-cs-fixer.yml | 6 ++-- .github/workflows/run-tests.yml | 47 ++++++++++++++++++++---------- composer.json | 9 +++--- phpunit.xml.dist | 26 +++++++---------- 4 files changed, 50 insertions(+), 38 deletions(-) diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index f55d1fa..1c25012 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -1,6 +1,8 @@ name: Check & fix styling -on: [push] +on: + schedule: + - cron: '0 12 * * 1' jobs: php-cs-fixer: @@ -8,7 +10,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.head_ref }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6cfe40e..179ccf9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,36 +2,51 @@ name: run-tests on: push: - branches: [main] pull_request: branches: [main] jobs: test: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest + strategy: fail-fast: true matrix: - os: [ubuntu-latest] - php: [7.4] - laravel: [8.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 8.* - testbench: ^6.6 - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + php: [7.4, '8.0', 8.1, 8.2, 8.3] + laravel: [8, 9, 10, 11] + exclude: + - php: 7.4 + laravel: 9 + - php: 7.4 + laravel: 10 + - php: 7.4 + laravel: 11 + - php: '8.0' + laravel: 10 + - php: '8.0' + laravel: 11 + - php: 8.1 + laravel: 11 + - php: 8.2 + laravel: 8 + - php: 8.3 + laravel: 8 + - php: 8.3 + laravel: 9 + + + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - 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, fileinfo - coverage: none + extensions: dom, curl, libxml, mbstring, zip + coverage: xdebug - name: Setup problem matchers run: | @@ -40,8 +55,8 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction + composer require "illuminate/contracts=^${{ matrix.laravel }}" --prefer-dist --no-interaction --no-update + composer update --prefer-dist --no-interaction --no-progress - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 8e71eae..40d3e00 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,13 @@ "php": "^7.4|^8.0", "spatie/laravel-package-tools": "^1.4.3", "blade-ui-kit/blade-icons": "^1.5", - "illuminate/support": "^8.0|^9.0||^10.0" + "illuminate/support": "^8.0|^9.0|^10.0|^11.0" }, "require-dev": { - "brianium/paratest": "^6.2", "liip/rmt": "^1.6", - "nunomaduro/collision": "^5.3", - "orchestra/testbench": "^6.0|^7.0|^8.0", - "phpunit/phpunit": "^9.3" + "nunomaduro/collision": "^5.3|^6.0|^7.0|^8.0", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 53bfbfc..95810dd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,14 +1,8 @@ - tests - + - ./src + src + + - - - + + + - + + From ec056f09be903bf005b5151751bc6301a4d6631f Mon Sep 17 00:00:00 2001 From: Swapnil Sarwe Date: Tue, 16 Jul 2024 16:43:39 +0530 Subject: [PATCH 2/2] reverting the changes - done temporarily --- .github/workflows/php-cs-fixer.yml | 4 +--- .github/workflows/run-tests.yml | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 1c25012..0672942 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -1,8 +1,6 @@ name: Check & fix styling -on: - schedule: - - cron: '0 12 * * 1' +on: [push] jobs: php-cs-fixer: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 179ccf9..be92327 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,7 +1,6 @@ name: run-tests on: - push: pull_request: branches: [main]