mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
* gha: run on PHP8 too The composer.json constraint is unbound, so it's already "allowed" at least. * gha: remove php-cs-fixer when running unit tests - not necessary anyway - not compatible with PHP8 currently * gha: lumen 6 and 7 don't support PHP8 * composer.json: allow spatie/phpunit-snapshot-assertions 4.* for PHP8 compatibility * php8-compat: Method ReflectionParameter::getClass() is deprecated * php8-compat: adapt expected error message depending on PHP version * composer.json: bump mockery to 1.3.3 minimum This is the minimum version also supporting PHP8 * gha: disable prefer-lowest for PHP8 Some lower version requirements like doctrone/dbal won't work and would require at least dbal 2.12.0, which in turn doesn't support PHP 7.2 anymore. So instead of bumping dbal and excluding PHP 7.2 users, we ignore the lowest version for PHP 8 for the time being. * Update CHANGELOG.md
133 lines
4.3 KiB
YAML
133 lines
4.3 KiB
YAML
name: Integration Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
php-lumen-integration-tests:
|
|
runs-on: ubuntu-20.04
|
|
timeout-minutes: 15
|
|
env:
|
|
COMPOSER_NO_INTERACTION: 1
|
|
strategy:
|
|
matrix:
|
|
php: [8.0, 7.4, 7.3, 7.2]
|
|
lumen: [8.*, 7.*, 6.*]
|
|
exclude:
|
|
- lumen: 6.*
|
|
php: 8.0
|
|
- lumen: 7.*
|
|
php: 8.0
|
|
- lumen: 8.*
|
|
php: 7.2
|
|
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: src
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
coverage: none
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample
|
|
cd sample
|
|
composer require "league/flysystem:^1" --no-update --no-progress
|
|
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:*"
|
|
|
|
- name: Insert service provider
|
|
run: sed -e 's|// \$app->register(App\\\Providers\\\EventServiceProvider::class);|&\n$app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);|' -i sample/bootstrap/app.php
|
|
|
|
- name: Execute generate run
|
|
run: |
|
|
cd sample
|
|
php artisan ide-helper:generate
|
|
|
|
- name: Execute meta run
|
|
run: |
|
|
cd sample
|
|
php artisan ide-helper:meta
|
|
|
|
- name: Check file existence
|
|
run: |
|
|
ls sample/_ide_helper.php
|
|
ls sample/.phpstorm.meta.php
|
|
|
|
- name: Check file count in logs
|
|
run: |
|
|
if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi
|
|
|
|
php-laravel-integration-tests:
|
|
runs-on: ubuntu-20.04
|
|
timeout-minutes: 15
|
|
env:
|
|
COMPOSER_NO_INTERACTION: 1
|
|
strategy:
|
|
matrix:
|
|
php: [7.4, 7.3, 7.2]
|
|
laravel: [8.*, 7.*, 6.*]
|
|
exclude:
|
|
- laravel: 8.*
|
|
php: 7.2
|
|
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: src
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
coverage: none
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --no-progress sample
|
|
cd sample
|
|
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:*"
|
|
|
|
- name: Execute generate run
|
|
run: |
|
|
cd sample
|
|
php artisan ide-helper:generate
|
|
|
|
- name: Execute meta run
|
|
run: |
|
|
cd sample
|
|
php artisan ide-helper:meta
|
|
|
|
- name: Check file existence
|
|
run: |
|
|
ls sample/_ide_helper.php
|
|
ls sample/.phpstorm.meta.php
|
|
|
|
- name: Check file count in logs
|
|
run: |
|
|
if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi
|