-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from laravel-shift/l10-compatibility
Laravel 10.x Compatibility
- Loading branch information
Showing
3 changed files
with
163 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,107 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [7.4, 7.3, 7.2, 7.1] | ||
laravel: [^8.0, ^7.0, ^6.0, 5.8.*, 5.7.*, 5.6.*, 5.5.*] | ||
include: | ||
- laravel: ^8.0 | ||
testbench: ^6.0 | ||
phpunit: 9.3 | ||
- laravel: ^7.0 | ||
testbench: ^5.0 | ||
phpunit: 8.5 | ||
- laravel: ^6.0 | ||
testbench: ^4.0 | ||
phpunit: 8.5 | ||
- laravel: 5.8.* | ||
testbench: ^3.8 | ||
phpunit: 7.5 | ||
- laravel: 5.7.* | ||
testbench: ^3.7 | ||
phpunit: 7.0 | ||
- laravel: 5.6.* | ||
testbench: ^3.6 | ||
phpunit: 7.0 | ||
- laravel: 5.5.* | ||
testbench: ^3.5 | ||
phpunit: 6.0 | ||
exclude: | ||
- laravel: ^8.0 | ||
php: 7.2 | ||
- laravel: ^8.0 | ||
php: 7.1 | ||
- laravel: ^7.0 | ||
php: 7.1 | ||
- laravel: ^6.0 | ||
php: 7.1 | ||
- laravel: 5.7.* | ||
php: 7.4 | ||
- laravel: 5.6.* | ||
php: 7.4 | ||
- laravel: 5.6.* | ||
php: 7.3 | ||
- laravel: 5.5.* | ||
php: 7.4 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [7.4, 7.3, 7.2, 7.1] | ||
laravel: [^8.0, ^7.0, ^6.0, 5.8.*, 5.7.*, 5.6.*, 5.5.*] | ||
include: | ||
- laravel: ^8.0 | ||
testbench: ^6.0 | ||
phpunit: 9.3 | ||
- laravel: ^7.0 | ||
testbench: ^5.0 | ||
phpunit: 8.5 | ||
- laravel: ^6.0 | ||
testbench: ^4.0 | ||
phpunit: 8.5 | ||
- laravel: 5.8.* | ||
testbench: ^3.8 | ||
phpunit: 7.5 | ||
- laravel: 5.7.* | ||
testbench: ^3.7 | ||
phpunit: 7.0 | ||
- laravel: 5.6.* | ||
testbench: ^3.6 | ||
phpunit: 7.0 | ||
- laravel: 5.5.* | ||
testbench: ^3.5 | ||
phpunit: 6.0 | ||
exclude: | ||
- laravel: ^8.0 | ||
php: 7.2 | ||
- laravel: ^8.0 | ||
php: 7.1 | ||
- laravel: ^7.0 | ||
php: 7.1 | ||
- laravel: ^6.0 | ||
php: 7.1 | ||
- laravel: 5.7.* | ||
php: 7.4 | ||
- laravel: 5.6.* | ||
php: 7.4 | ||
- laravel: 5.6.* | ||
php: 7.3 | ||
- laravel: 5.5.* | ||
php: 7.4 | ||
|
||
name: P${{ matrix.php }} - L${{ matrix.laravel }} | ||
name: P${{ matrix.php }} - L${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip | ||
tools: composer:v2 | ||
coverage: pcov | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip | ||
tools: composer:v2 | ||
coverage: pcov | ||
|
||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
|
||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer- | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer- | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:^${{ matrix.phpunit }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:^${{ matrix.phpunit }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
- name: Setup PCOV | ||
if: ${{ matrix.phpunit < 8 }} | ||
run: | | ||
composer require pcov/clobber | ||
vendor/bin/pcov clobber | ||
- name: Setup PCOV | ||
if: ${{ matrix.phpunit < 8 }} | ||
run: | | ||
composer require pcov/clobber | ||
vendor/bin/pcov clobber | ||
- name: Execute tests | ||
run: vendor/bin/phpunit --verbose --whitelist=src --coverage-clover=build/coverage/clover.xml | ||
- name: Execute tests | ||
run: vendor/bin/phpunit --verbose --whitelist=src --coverage-clover=build/coverage/clover.xml | ||
|
||
- name: Upload coverage | ||
uses: sudo-bot/action-scrutinizer@latest | ||
with: | ||
cli-args: "--format=php-clover build/coverage/clover.xml" | ||
- name: Upload coverage | ||
uses: sudo-bot/action-scrutinizer@latest | ||
with: | ||
cli-args: "--format=php-clover build/coverage/clover.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,86 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.1, 8.0] | ||
laravel: [^9.0, ^8.0, '^7.0', ^6.0] | ||
include: | ||
- laravel: ^9.0 | ||
testbench: ^7.0 | ||
- laravel: ^8.0 | ||
testbench: ^6.0 | ||
- laravel: ^7.0 | ||
testbench: ^5.0 | ||
- laravel: ^6.0 | ||
testbench: ^4.0 | ||
exclude: | ||
- laravel: ^7.0 | ||
php: 8.1 | ||
- laravel: ^6.0 | ||
php: 8.1 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.2, 8.1, 8.0] | ||
laravel: [^10.0, ^9.0, ^8.0, "^7.0", ^6.0] | ||
include: | ||
- laravel: ^10.0 | ||
testbench: ^8.0 | ||
- laravel: ^9.0 | ||
testbench: ^7.0 | ||
- laravel: ^8.0 | ||
testbench: ^6.0 | ||
- laravel: ^7.0 | ||
testbench: ^5.0 | ||
- laravel: ^6.0 | ||
testbench: ^4.0 | ||
exclude: | ||
- laravel: ^10.0 | ||
php: 8.0 | ||
- laravel: ^8.0 | ||
php: 8.2 | ||
- laravel: ^7.0 | ||
php: 8.2 | ||
- laravel: ^7.0 | ||
php: 8.1 | ||
- laravel: ^6.0 | ||
php: 8.2 | ||
- laravel: ^6.0 | ||
php: 8.1 | ||
|
||
name: P${{ matrix.php }} - L${{ matrix.laravel }} | ||
name: P${{ matrix.php }} - L${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip | ||
tools: composer:v2 | ||
coverage: pcov | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip | ||
tools: composer:v2 | ||
coverage: pcov | ||
|
||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
|
||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer- | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: $p{{ matrix.php }}-l{{ matrix.laravel }}-composer- | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
- name: Execute tests | ||
run: vendor/bin/phpunit --verbose --whitelist=src --coverage-clover=build/coverage/clover.xml | ||
- name: Execute tests | ||
run: vendor/bin/phpunit --verbose --whitelist=src --coverage-clover=build/coverage/clover.xml | ||
|
||
- name: Upload coverage | ||
uses: sudo-bot/action-scrutinizer@latest | ||
with: | ||
cli-args: "--format=php-clover build/coverage/clover.xml" | ||
- name: Upload coverage | ||
uses: sudo-bot/action-scrutinizer@latest | ||
with: | ||
cli-args: "--format=php-clover build/coverage/clover.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters