-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
8 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- master | ||
- cake5 | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
@@ -62,37 +63,40 @@ jobs: | |
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:[email protected]/postgres'; fi | ||
if [[ ${{ matrix.php-version }} == '8.1' && ${{ matrix.db-type }} == 'mysql' ]]; then | ||
vendor/bin/phpunit tests/TestCase --coverage-clover=coverage.xml | ||
vendor/bin/phpunit --coverage-clover=coverage.xml | ||
else | ||
vendor/bin/phpunit tests/TestCase | ||
vendor/bin/phpunit | ||
fi | ||
- name: Code Coverage Report | ||
if: success() && matrix.php-version == '8.1' && matrix.db-type == 'mysql' | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v4 | ||
|
||
cs-stan: | ||
name: Coding Standard & Static Analysis | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
extensions: mbstring, intl | ||
coverage: none | ||
tools: psalm:5, phpstan:1.10 | ||
tools: psalm:5, phpstan:1.10, cs2pr | ||
|
||
- name: Composer install | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run phpcs | ||
run: vendor/bin/phpcs --standard=CakePHP src/ tests/ | ||
run: vendor/bin/phpcs | cs2pr | ||
|
||
- name: Run psalm | ||
if: success() || failure() | ||
if: always() | ||
run: psalm --output-format=github | ||
|
||
- name: Run phpstan | ||
if: success() || failure() | ||
if: always() | ||
run: phpstan analyse |