diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b4840f4..047c5e1 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,18 +2,21 @@ name: run-tests on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + branches: + - main jobs: test: runs-on: ubuntu-latest + strategy: fail-fast: true matrix: - php: [8.3, 8.2, 8.1] - laravel: [11.*, 10.*, 9.*] + php: [8.4, 8.3, 8.2, 8.1] + laravel: ['9.*', '10.*', '11.*', '12.*'] stability: [prefer-stable] include: - laravel: 11.* @@ -23,9 +26,13 @@ jobs: - laravel: 9.* testbench: 7.* - php: 8.1 + - laravel: 12.* + testbench: 10.* exclude: - laravel: 11.* php: 8.1 + - laravel: 12.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ubuntu-latest @@ -44,6 +51,7 @@ jobs: run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies run: | composer require \ @@ -52,5 +60,6 @@ jobs: "${{ matrix.php == '8.1' && 'roave/better-reflection:6.25.*' || 'roave/better-reflection:6.*' }}" \ --no-interaction --no-update --ignore-platform-reqs composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ignore-platform-reqs + - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 3dcff44..be4f75d 100644 --- a/composer.json +++ b/composer.json @@ -1,50 +1,53 @@ { - "name": "juampi92/phecks", - "description": "A package to run custom PHP checks", - "authors": [ - { - "name": "juampi92", - "email": "juampi92@gmail.com" + "name": "juampi92/phecks", + "description": "A package to run custom PHP checks", + "authors": [ + { + "name": "juampi92", + "email": "juampi92@gmail.com" + } + ], + "license": "MIT", + "keywords": [ + "laravel", + "api" + ], + "require": { + "php": "^8.1|^8.2|^8.3|^8.4", + "ext-json": "*", + "illuminate/console": "^9.0|^10.0|^11.0|^12.0", + "illuminate/contracts": "^9.0|^10.0|^11.0|^12.0", + "illuminate/filesystem": "^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^9.0|^10.0|^11.0|^12.0", + "roave/better-reflection": "^6.25" + }, + "require-dev": { + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0", + "friendsofphp/php-cs-fixer": "^3.13", + "phpunit/phpunit": "^9.0|^10.5|^11.5.3", + "larastan/larastan": "^2.9|^3" + }, + "autoload": { + "psr-4": { + "Juampi92\\Phecks\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Juampi92\\Phecks\\Tests\\": "tests/" + } + }, + "scripts": { + "test": "vendor/bin/phpunit --colors=always", + "test-coverage": "vendor/bin/phpunit --coverage-html coverage", + "php-cs-fix": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -vv", + "phpstan": "./vendor/bin/phpstan analyze -c phpstan.neon.dist --memory-limit 1G" + }, + "extra": { + "laravel": { + "providers": [ + "Juampi92\\Phecks\\PhecksServiceProvider" + ] + } } - ], - "license": "MIT", - "keywords": ["laravel", "api"], - "require": { - "php" : "^8.1|^8.2|^8.3", - "ext-json": "*", - "illuminate/console": "^9.0|^10.0|^11.0", - "illuminate/contracts": "^9.0|^10.0|^11.0", - "illuminate/filesystem": "^9.0|^10.0|^11.0", - "illuminate/support": "^9.0|^10.0|^11.0", - "roave/better-reflection": "^6.25" - }, - "require-dev": { - "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", - "friendsofphp/php-cs-fixer": "^3.13", - "phpunit/phpunit": "^9.0|^10.5", - "larastan/larastan": "^2.9" - }, - "autoload": { - "psr-4": { - "Juampi92\\Phecks\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Juampi92\\Phecks\\Tests\\": "tests/" - } - }, - "scripts": { - "test": "vendor/bin/phpunit --colors=always", - "test-coverage": "vendor/bin/phpunit --coverage-html coverage", - "php-cs-fix": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -vv", - "phpstan": "./vendor/bin/phpstan analyze -c phpstan.neon.dist --memory-limit 1G" - }, - "extra": { - "laravel": { - "providers": [ - "Juampi92\\Phecks\\PhecksServiceProvider" - ] - } - } }