-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make package compatible with Laravel 11 (#180)
- Loading branch information
1 parent
55ecf60
commit fd81143
Showing
4 changed files
with
112 additions
and
96 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,42 +1,44 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: [8.0, 8.1, 8.2] | ||
|
||
name: PHP${{ matrix.php }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-php${{ matrix.php }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-suggest | ||
|
||
- name: Execute linters | ||
run: php vendor/bin/php-cs-fixer fix --dry-run --diff | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: [8.0, 8.1, 8.2] | ||
|
||
name: PHP${{ matrix.php }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-php${{ matrix.php }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-suggest | ||
|
||
- name: Execute linters | ||
run: php vendor/bin/php-cs-fixer fix --dry-run --diff |
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,64 +1,72 @@ | ||
name: Unit tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: [8.0, 8.1, 8.2] | ||
laravel: [8.*, 9.*, 10.*] | ||
include: | ||
- laravel: 10.* | ||
testbench: 8.* | ||
- laravel: 8.* | ||
testbench: 6.* | ||
- laravel: 9.* | ||
testbench: 7.* | ||
exclude: | ||
- laravel: 10.* | ||
php: 8.0 | ||
strategy: | ||
matrix: | ||
php: [8.0, 8.1, 8.2] | ||
laravel: [8.*, 9.*, 10.*, 11.*] | ||
include: | ||
- laravel: 10.* | ||
testbench: 8.* | ||
- laravel: 8.* | ||
testbench: 6.* | ||
- laravel: 9.* | ||
testbench: 7.* | ||
- laravel: 11.* | ||
testbench: 9.* | ||
exclude: | ||
- laravel: 10.* | ||
php: 8.0 | ||
- laravel: 11.* | ||
php: 8.0 | ||
- laravel: 11.* | ||
php: 8.1 | ||
|
||
name: PHP${{ matrix.php }} - L${{ matrix.laravel }} | ||
name: PHP${{ matrix.php }} - L${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: xdebug | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: xdebug | ||
|
||
- 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 "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}-php${{ matrix.php }}-L${{ matrix.laravel }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}-php${{ matrix.php }} | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }} | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
${{ runner.os }}-composer- | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}-php${{ matrix.php }}-L${{ matrix.laravel }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}-php${{ matrix.php }} | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }} | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-suggest | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-suggest | ||
- name: Execute tests | ||
uses: paambaati/codeclimate-action@v2.7.4 | ||
env: | ||
CC_TEST_REPORTER_ID: 23639f09f4ef515ddb5fea9baf90f9f5cd9bb5e0801cf1dc062d993a3d70d3eb | ||
with: | ||
coverageCommand: vendor/bin/codecept run --xml test_report.xml --coverage --coverage-html --coverage-xml | ||
coverageLocations: | | ||
${{github.workspace}}/tests/_output/coverage.xml:clover | ||
- name: Execute tests | ||
uses: paambaati/codeclimate-action@v2.7.4 | ||
env: | ||
CC_TEST_REPORTER_ID: 23639f09f4ef515ddb5fea9baf90f9f5cd9bb5e0801cf1dc062d993a3d70d3eb | ||
with: | ||
coverageCommand: vendor/bin/codecept run --xml test_report.xml --coverage --coverage-html --coverage-xml | ||
coverageLocations: | | ||
${{github.workspace}}/tests/_output/coverage.xml:clover |
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
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