|
| 1 | +name: Integration Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - "*" |
| 10 | + schedule: |
| 11 | + - cron: '0 0 * * *' |
| 12 | + |
| 13 | +jobs: |
| 14 | + php-lumen-integration-tests: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + timeout-minutes: 15 |
| 17 | + env: |
| 18 | + COMPOSER_NO_INTERACTION: 1 |
| 19 | + strategy: |
| 20 | + matrix: |
| 21 | + php: [7.4, 7.3, 7.2] |
| 22 | + lumen: [7.*, 6.*] |
| 23 | + name: P${{ matrix.php }} - Lumen${{ matrix.lumen }} |
| 24 | + steps: |
| 25 | + - name: Checkout code |
| 26 | + uses: actions/checkout@v2 |
| 27 | + with: |
| 28 | + path: src |
| 29 | + |
| 30 | + - name: Setup PHP |
| 31 | + uses: shivammathur/setup-php@v2 |
| 32 | + with: |
| 33 | + php-version: ${{ matrix.php }} |
| 34 | + coverage: none |
| 35 | + tools: composer:v2 |
| 36 | + |
| 37 | + - name: Install dependencies |
| 38 | + run: | |
| 39 | + composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample |
| 40 | + cd sample |
| 41 | + composer require "league/flysystem" --no-update --no-progress |
| 42 | + composer update --prefer-stable --prefer-dist --no-progress |
| 43 | +
|
| 44 | + - name: Add package from source |
| 45 | + run: | |
| 46 | + cd sample |
| 47 | + sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json |
| 48 | + composer require --dev "barryvdh/laravel-ide-helper:*" |
| 49 | +
|
| 50 | + - name: Insert service provider |
| 51 | + run: sed -e 's|// \$app->register(App\\\Providers\\\EventServiceProvider::class);|&\n$app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);|' -i sample/bootstrap/app.php |
| 52 | + |
| 53 | + - name: Execute generate run |
| 54 | + run: | |
| 55 | + cd sample |
| 56 | + php artisan ide-helper:generate |
| 57 | +
|
| 58 | + - name: Execute meta run |
| 59 | + run: | |
| 60 | + cd sample |
| 61 | + php artisan ide-helper:meta |
| 62 | +
|
| 63 | + - name: Check file existence |
| 64 | + run: | |
| 65 | + ls sample/_ide_helper.php |
| 66 | + ls sample/.phpstorm.meta.php |
| 67 | +
|
| 68 | + - name: Check file count in logs |
| 69 | + run: | |
| 70 | + if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi |
| 71 | +
|
| 72 | + php-laravel-integration-tests: |
| 73 | + runs-on: ubuntu-latest |
| 74 | + timeout-minutes: 15 |
| 75 | + env: |
| 76 | + COMPOSER_NO_INTERACTION: 1 |
| 77 | + strategy: |
| 78 | + matrix: |
| 79 | + php: [7.4, 7.3, 7.2] |
| 80 | + laravel: [8.*, 7.*, 6.*] |
| 81 | + exclude: |
| 82 | + - laravel: 8.* |
| 83 | + php: 7.2 |
| 84 | + name: P${{ matrix.php }} - Laravel${{ matrix.laravel }} |
| 85 | + steps: |
| 86 | + - name: Checkout code |
| 87 | + uses: actions/checkout@v2 |
| 88 | + with: |
| 89 | + path: src |
| 90 | + |
| 91 | + - name: Setup PHP |
| 92 | + uses: shivammathur/setup-php@v2 |
| 93 | + with: |
| 94 | + php-version: ${{ matrix.php }} |
| 95 | + coverage: none |
| 96 | + tools: composer:v2 |
| 97 | + |
| 98 | + - name: Install dependencies |
| 99 | + run: | |
| 100 | + composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --no-progress sample |
| 101 | + cd sample |
| 102 | + composer update --prefer-stable --prefer-dist --no-progress |
| 103 | +
|
| 104 | + - name: Add package from source |
| 105 | + run: | |
| 106 | + cd sample |
| 107 | + sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json |
| 108 | + composer require --dev "barryvdh/laravel-ide-helper:*" |
| 109 | +
|
| 110 | + - name: Execute generate run |
| 111 | + run: | |
| 112 | + cd sample |
| 113 | + php artisan ide-helper:generate |
| 114 | +
|
| 115 | + - name: Execute meta run |
| 116 | + run: | |
| 117 | + cd sample |
| 118 | + php artisan ide-helper:meta |
| 119 | +
|
| 120 | + - name: Check file existence |
| 121 | + run: | |
| 122 | + ls sample/_ide_helper.php |
| 123 | + ls sample/.phpstorm.meta.php |
| 124 | +
|
| 125 | + - name: Check file count in logs |
| 126 | + run: | |
| 127 | + if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi |
0 commit comments