-
Notifications
You must be signed in to change notification settings - Fork 13
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 #52 from UseMuffin/cake5
Cake5
- Loading branch information
Showing
12 changed files
with
117 additions
and
122 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,74 +1,22 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- cake5 | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
testsuite: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: ['7.2', '7.4'] | ||
prefer-lowest: [''] | ||
include: | ||
- php-version: '7.2' | ||
prefer-lowest: 'prefer-lowest' | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl | ||
coverage: pcov | ||
|
||
- name: Composer install | ||
run: | | ||
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then | ||
composer update --prefer-lowest --prefer-stable | ||
else | ||
composer install | ||
fi | ||
- name: Run PHPUnit | ||
run: | | ||
if [[ ${{ matrix.php-version }} == '7.4' ]]; then | ||
vendor/bin/phpunit --coverage-clover=coverage.xml | ||
else | ||
vendor/bin/phpunit | ||
fi | ||
- name: Code Coverage Report | ||
if: success() && matrix.php-version == '7.4' | ||
uses: codecov/codecov-action@v1 | ||
uses: cakephp/.github/.github/workflows/[email protected] | ||
secrets: inherit | ||
|
||
cs-stan: | ||
name: Coding Standard & Static Analysis | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extension: mbstring, intl | ||
coverage: none | ||
tools: cs2pr, phpstan:^0.12 | ||
|
||
- name: Composer Install | ||
run: composer install | ||
|
||
- name: Run phpcs | ||
run: vendor/bin/phpcs --report=checkstyle --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ | cs2pr | ||
|
||
- name: Run phpstan | ||
if: success() || failure() | ||
run: phpstan analyse | ||
uses: cakephp/.github/.github/workflows/[email protected] | ||
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="phpstan" version="1.10.32" installed="1.10.32" location="./tools/phpstan" copy="false"/> | ||
<phar name="psalm" version="5.15.0" installed="5.15.0" location="./tools/psalm" copy="false"/> | ||
</phive> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Throttle"> | ||
<config name="installed_paths" value="../../cakephp/cakephp-codesniffer" /> | ||
|
||
<rule ref="CakePHP" /> | ||
</ruleset> |
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,30 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
bootstrap="./tests/bootstrap.php" | ||
colors="true" | ||
stopOnFailure="false" | ||
> | ||
|
||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" cacheDirectory=".phpunit.cache"> | ||
<coverage/> | ||
<php> | ||
<ini name="memory_limit" value="-1"/> | ||
<ini name="apc.enable_cli" value="1"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="Throttle Test Cases"> | ||
<directory>./tests/</directory> | ||
<directory>tests/TestCase/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<!-- Setup a listener for fixtures --> | ||
<listeners> | ||
<listener | ||
class="\Cake\TestSuite\Fixture\FixtureInjector" | ||
file="./vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php"> | ||
<arguments> | ||
<object class="\Cake\TestSuite\Fixture\FixtureManager" /> | ||
</arguments> | ||
</listener> | ||
</listeners> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">./src/</directory> | ||
</whitelist> | ||
</filter> | ||
<extensions> | ||
<bootstrap class="Cake\TestSuite\Fixture\Extension\PHPUnitExtension"/> | ||
</extensions> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</source> | ||
</phpunit> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="3" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
findUnusedBaselineEntry="true" | ||
findUnusedCode="false" | ||
> | ||
<projectFiles> | ||
<directory name="src" /> | ||
<ignoreFiles> | ||
<directory name="vendor" /> | ||
</ignoreFiles> | ||
</projectFiles> | ||
</psalm> |
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.