diff --git a/.github/workflows/run-integration-tests.yml b/.github/workflows/run-integration-tests.yml index 4af0db6..1f26424 100644 --- a/.github/workflows/run-integration-tests.yml +++ b/.github/workflows/run-integration-tests.yml @@ -1,75 +1,79 @@ name: Integration Tests on: - push: - branches: - - master - pull_request: - branches: - - "*" - schedule: - - cron: '0 0 * * *' + push: + branches: + - master + pull_request: + branches: + - "*" jobs: - php-laravel-integration-tests: - runs-on: ubuntu-22.04 - timeout-minutes: 15 - env: - COMPOSER_NO_INTERACTION: 1 - strategy: - fail-fast: false - matrix: - php: [8.5, 8.4, 8.3, 8.2] - laravel: [11.x, 12.x] + php-laravel-integration-tests: + runs-on: ubuntu-22.04 - name: P${{ matrix.php }} - Laravel${{ matrix.laravel }} - steps: - - name: Checkout code - uses: actions/checkout@v6 - with: - path: src + timeout-minutes: 15 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none + env: + COMPOSER_NO_INTERACTION: 1 - - name: Install dependencies - run: | - composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --stability=dev --no-progress sample - cd sample - composer config minimum-stability dev - composer update --prefer-stable --prefer-dist --no-progress + strategy: + fail-fast: false + matrix: + php: [8.5, 8.4, 8.3, 8.2] + laravel: [11.x, 12.x, 13.x] + exclude: + - laravel: 13.x + php: 8.2 - - name: Add package from source - run: | - cd sample - sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json - composer require --dev "barryvdh/laravel-ide-helper:*" --with-all-dependencies + name: P${{ matrix.php }} - Laravel${{ matrix.laravel }} - - name: Execute generate run - run: | - cd sample - php artisan ide-helper:generate + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + path: src - - name: Execute meta run - run: | - cd sample - php artisan ide-helper:meta -v + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none - - name: Check file existence - run: | - ls sample/_ide_helper.php - ls sample/.phpstorm.meta.php + - name: Install dependencies + run: | + composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --stability=dev --no-progress sample + cd sample + composer config minimum-stability dev + composer update --prefer-stable --prefer-dist --no-progress + - name: Add package from source + run: | + cd sample + sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json + composer require --dev "barryvdh/laravel-ide-helper:*" --with-all-dependencies - - name: Check logs - run: | - if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ]; then - for logfile in sample/storage/logs/*; do - echo "-- $logfile --" - cat $logfile - done - exit 1 - fi + - name: Execute generate run + run: | + cd sample + php artisan ide-helper:generate + + - name: Execute meta run + run: | + cd sample + php artisan ide-helper:meta -v + + - name: Check file existence + run: | + ls sample/_ide_helper.php + ls sample/.phpstorm.meta.php + + - name: Check logs + run: | + if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ]; then + for logfile in sample/storage/logs/*; do + echo "-- $logfile --" + cat $logfile + done + exit 1 + fi diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 1573da6..5c0953d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -7,13 +7,13 @@ on: pull_request: branches: - "*" - schedule: - - cron: '0 0 * * *' jobs: php-tests: runs-on: ${{ matrix.os }} + timeout-minutes: 15 + env: COMPOSER_NO_INTERACTION: 1 @@ -22,36 +22,40 @@ jobs: matrix: os: [ubuntu-latest] php: [8.5, 8.4, 8.3, 8.2] - laravel: [~11.15, 12.x] + laravel: [12.x, 13.x, ~11.15] stability: [prefer-lowest, prefer-stable] include: - os: windows-latest php: 8.3 laravel: 12.x stability: prefer-stable + exclude: + - laravel: 13.x + php: 8.2 + steps: - - name: Set git to use LF - if: ${{ matrix.os == 'windows-latest' }} - run: | - git config --global core.autocrlf false - git config --global core.eol lf + - name: Set git to use LF + if: "${{ matrix.os == 'windows-latest' }}" + run: | + git config --global core.autocrlf false + git config --global core.eol lf - - name: Checkout code - uses: actions/checkout@v6 + - name: Checkout code + uses: actions/checkout@v6 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: pdo_sqlite, fileinfo + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + extensions: pdo_sqlite, fileinfo - - name: Install dependencies - run: | - composer remove vimeo/psalm --no-update --dev - composer remove friendsofphp/php-cs-fixer --no-update --dev - composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress - composer update --prefer-dist --no-progress --${{ matrix.stability }} + - name: Install dependencies + run: | + composer remove vimeo/psalm --no-update --dev + composer remove friendsofphp/php-cs-fixer --no-update --dev + composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress + composer update --prefer-dist --no-progress --${{ matrix.stability }} - - name: Execute Unit Tests - run: composer test-ci + - name: Execute Unit Tests + run: composer test-ci diff --git a/composer.json b/composer.json index 57a1bc7..807c69d 100644 --- a/composer.json +++ b/composer.json @@ -25,21 +25,21 @@ "ext-json": "*", "barryvdh/reflection-docblock": "^2.4", "composer/class-map-generator": "^1.0", - "illuminate/console": "^11.15 || ^12", - "illuminate/database": "^11.15 || ^12", - "illuminate/filesystem": "^11.15 || ^12", - "illuminate/support": "^11.15 || ^12" + "illuminate/console": "^11.15 || ^12 || ^13.0", + "illuminate/database": "^11.15 || ^12 || ^13.0", + "illuminate/filesystem": "^11.15 || ^12 || ^13.0", + "illuminate/support": "^11.15 || ^12 || ^13.0" }, "require-dev": { "ext-pdo_sqlite": "*", "friendsofphp/php-cs-fixer": "^3", - "illuminate/config": "^11.15 || ^12", - "illuminate/view": "^11.15 || ^12", + "illuminate/config": "^11.15 || ^12 || ^13.0", + "illuminate/view": "^11.15 || ^12 || ^13.0", "larastan/larastan": "^3.1", "mockery/mockery": "^1.4", - "orchestra/testbench": "^9.2 || ^10", + "orchestra/testbench": "^9.2 || ^10 || ^11.0", "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^10.5 || ^11.5.3", + "phpunit/phpunit": "^10.5 || ^11.5.3 || ^12.5.12", "spatie/phpunit-snapshot-assertions": "^4 || ^5", "vlucas/phpdotenv": "^5" }, @@ -86,7 +86,7 @@ "php-cs-fixer fix --config=.php-cs-fixer.tests.php" ], "test": "phpunit", - "test-ci": "phpunit -d --without-creating-snapshots", + "test-ci": "phpunit", "test-regenerate": "phpunit -d --update-snapshots" } }