-
Notifications
You must be signed in to change notification settings - Fork 145
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 #701 from FriendsOfCake/cake-5
Cake 5
- Loading branch information
Showing
87 changed files
with
917 additions
and
1,368 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,94 +1,21 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
testsuite: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: ['7.4', '8.0', '8.1', '8.2'] | ||
db-type: [sqlite, mysql, pgsql] | ||
prefer-lowest: [''] | ||
include: | ||
- php-version: '7.2' | ||
db-type: 'sqlite' | ||
prefer-lowest: 'prefer-lowest' | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Service | ||
if: matrix.db-type == 'mysql' | ||
run: | | ||
sudo service mysql start | ||
mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE cakephp;' | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl, pdo_${{ matrix.db-type }} | ||
coverage: pcov | ||
|
||
- name: Composer install | ||
run: | | ||
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then | ||
composer update --prefer-lowest --prefer-stable | ||
else | ||
composer update | ||
fi | ||
- name: Run PHPUnit | ||
run: | | ||
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi | ||
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:[email protected]/cakephp'; fi | ||
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:[email protected]/postgres'; fi | ||
if [[ ${{ matrix.php-version }} == '7.4' && ${{ matrix.db-type }} == 'sqlite' ]]; then | ||
vendor/bin/phpunit --coverage-clover=coverage.xml | ||
else | ||
vendor/bin/phpunit | ||
fi | ||
- name: Code Coverage Report | ||
if: success() && matrix.php-version == '7.4' && matrix.db-type == 'sqlite' | ||
uses: codecov/codecov-action@v2 | ||
uses: ADmad/.github/.github/workflows/testsuite-with-db.yml@master | ||
secrets: inherit | ||
|
||
cs-stan: | ||
name: Coding Standard & Static Analysis | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, intl | ||
coverage: none | ||
tools: vimeo/psalm:4.23, phpstan:1.9, cs2pr | ||
|
||
- name: Composer Install | ||
run: composer require --dev cakephp/cakephp-codesniffer:^4.1 | ||
|
||
- name: Run phpcs | ||
run: vendor/bin/phpcs --report=checkstyle --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ | cs2pr | ||
|
||
- name: Run psalm | ||
if: always() | ||
run: psalm --output-format=github | ||
|
||
- name: Run phpstan | ||
if: always() | ||
run: phpstan analyse --error-format=github | ||
uses: ADmad/.github/.github/workflows/cs-stan.yml@master | ||
secrets: inherit |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ phpunit.xml | |
vendor/ | ||
composer.lock | ||
tmp | ||
.phpunit.cache | ||
.phpunit.result.cache |
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
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
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
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
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
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
Oops, something went wrong.