Skip to content

Commit

Permalink
Merge 62e0051 into bf97b60
Browse files Browse the repository at this point in the history
  • Loading branch information
cnizzardini committed Jan 8, 2023
2 parents bf97b60 + 62e0051 commit 38b2887
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 31 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2']
php-versions: ['8.1', '8.2']

name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
Expand Down Expand Up @@ -37,33 +37,28 @@ jobs:
cp config/.env.example config/.env
cp config/app_local.example.php config/app_local.php
- name: Test Suite + Static Analysis (PHP 8.0)
if: ${{ matrix.php-versions == '8.0' }}
- name: Test Suite + Static Analysis
if: ${{ matrix.php-versions}}
run: |
composer analyze
- name: Upload coverage results to Coveralls (PHP 8.0)
if: ${{ matrix.php-versions == '8.0' }}
- name: Upload coverage results to Coveralls
if: ${{ matrix.php-versions == '8.1' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=clover.xml
php-coveralls --coverage_clover=clover.xml -v
- name: Test Suite (PHP 8.1)
if: ${{ matrix.php-versions == '8.1' }}
run: |
composer test
#
# CakePHP version compatability
#
compatibility:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['~4.2.0', '~4.3.0', '^4.4']
version: ['^4.4']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -85,3 +80,32 @@ jobs:
composer require cakephp/cakephp:${{matrix.version}} --no-update
composer install --prefer-dist --no-progress
composer test
#
# Test plugins individually
#
plugins:
runs-on: ubuntu-latest
strategy:
matrix:
plugin: ['bake','core','exception-render','hal-view','json-ld-view','jwt-auth']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl, sqlite3, xml, simplexml, mysqli

- name: PHP Version
run: php -v

- name: ${{matrix.plugin}} tests
run: |
cp config/.env.example config/.env
cp plugins/${{matrix.plugin}}/composer.json .
rm -rf composer.lock
composer install
vendor/bin/phpunit plugins/${{matrix.plugin}}
12 changes: 4 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"MixerApi\\ExceptionRender\\": "plugins/exception-render/src/",
"MixerApi\\HalView\\": "plugins/hal-view/src/",
"MixerApi\\JsonLdView\\": "plugins/json-ld-view/src/",
"MixerApi\\JwtAuth\\": "plugins/jwt-auth/src/",
"MixerApi\\Rest\\": "plugins/rest/src/"
"MixerApi\\JwtAuth\\": "plugins/jwt-auth/src/"
}
},
"autoload-dev": {
Expand All @@ -73,15 +72,12 @@
"MixerApi\\ExceptionRender\\Test\\App\\": "plugins/exception-render/tests/test_app/src/",
"MixerApi\\HalView\\Test\\": "plugins/hal-view/tests/",
"MixerApi\\HalView\\Test\\App\\": "plugins/hal-view/tests/test_app/src/",
"MixerApi\\JwtAuth\\Test\\": "plugins/jwt-auth/tests/",
"MixerApi\\JwtAuth\\Test\\App\\": "plugins/jwt-auth/tests/test_app/src/",
"MixerApi\\JsonLdView\\Test\\": "plugins/json-ld-view/tests/",
"MixerApi\\JsonLdView\\Test\\App\\": "plugins/json-ld-view/tests/test_app/src/",
"MixerApi\\JwtAuth\\Test\\": "plugins/jwt-auth/tests/",
"MixerApi\\JwtAuth\\Test\\App\\": "plugins/jwt-auth/tests/test_app/src/",
"MixerApi\\Test\\": "plugins/mixerapi/tests/",
"MixerApi\\Test\\App\\": "plugins/mixerapi/tests/test_app/src/",
"MixerApi\\Rest\\Test\\": "plugins/rest/tests/",
"MixerApi\\Rest\\Test\\App\\": "plugins/rest/tests/test_app/src/",
"MixerApi\\Rest\\Test\\MyPlugin\\": "plugins/rest/tests/plugins/MyPlugin/"
"MixerApi\\Test\\App\\": "plugins/mixerapi/tests/test_app/src/"
}
},
"scripts": {
Expand Down
20 changes: 19 additions & 1 deletion plugins/bake/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@
"cakephp/cakephp": "^4.2",
"cakephp/bake": "^2.1"
},
"require-dev": {
"josegonzalez/dotenv": "^3.2",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
"MixerApi\\Bake\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MixerApi\\Bake\\": "plugins/bake/src/",
"MixerApi\\Bake\\Test\\": "plugins/bake/tests/",
"MixerApi\\Bake\\Test\\App\\": "plugins/bake/tests/test_app/src/"
}
},
"support": {
"issues": "https://github.com/mixerapi/mixerapi-dev/issues",
"source": "https://github.com/mixerapi/bake"
Expand All @@ -23,5 +34,12 @@
"name": "MixerApi",
"role": "Organization"
}
]
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true,
"phpro/grumphp": true
}
}
}
20 changes: 19 additions & 1 deletion plugins/collection-view/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@
"cakephp/cakephp": "^4.2",
"adbario/php-dot-notation": "^2.3"
},
"require-dev": {
"josegonzalez/dotenv": "^3.2",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
"MixerApi\\CollectionView\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MixerApi\\CollectionView\\": "plugins/collection-view/src/",
"MixerApi\\HalView\\Test\\": "plugins/hal-view/tests/",
"MixerApi\\HalView\\Test\\App\\": "plugins/hal-view/tests/test_app/src/"
}
},
"support": {
"issues": "https://github.com/mixerapi/mixerapi-dev/issues",
"source": "https://github.com/mixerapi/collection-view"
Expand All @@ -23,5 +34,12 @@
"name": "MixerApi",
"role": "Organization"
}
]
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true,
"phpro/grumphp": true
}
}
}
20 changes: 19 additions & 1 deletion plugins/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@
"cakephp/cakephp": "^4.2",
"thecodingmachine/class-explorer": "^1.1"
},
"require-dev": {
"josegonzalez/dotenv": "^3.2",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
"MixerApi\\Core\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MixerApi\\Core\\": "plugins/core/src/",
"MixerApi\\Core\\Test\\": "plugins/core/tests/",
"MixerApi\\Core\\Test\\App\\": "plugins/core/tests/test_app/src/"
}
},
"support": {
"issues": "https://github.com/mixerapi/mixerapi-dev/issues",
"source": "https://github.com/mixerapi/core"
Expand All @@ -23,5 +34,12 @@
"name": "MixerApi",
"role": "Organization"
}
]
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true,
"phpro/grumphp": true
}
}
}
18 changes: 18 additions & 0 deletions plugins/crud/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,30 @@
"php": "^8.0",
"cakephp/cakephp": "^4.2"
},
"require-dev": {
"josegonzalez/dotenv": "^3.2",
"phpunit/phpunit": "^9.0"
},
"suggest": {
"friendsofcake/search": "Integrates with mixerapi/crud for easy paginatable search filters"
},
"autoload": {
"psr-4": {
"MixerApi\\Crud\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MixerApi\\Crud\\": "plugins/crud/src/",
"MixerApi\\Crud\\Test\\": "plugins/crud/tests/",
"MixerApi\\Crud\\Test\\App\\": "plugins/crud/tests/test_app/src/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true,
"phpro/grumphp": true
}
}
}
20 changes: 18 additions & 2 deletions plugins/exception-render/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@
"cakephp/cakephp": "^4.2"
},
"require-dev": {
"cnizzardini/cakephp-swagger-bake": "^2.1"
"cnizzardini/cakephp-swagger-bake": "^2.1",
"josegonzalez/dotenv": "^3.2",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
"MixerApi\\ExceptionRender\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MixerApi\\ExceptionRender\\": "plugins/exception-render/src/",
"MixerApi\\ExceptionRender\\Test\\": "plugins/exception-render/tests/",
"MixerApi\\ExceptionRender\\Test\\App\\": "plugins/exception-render/tests/test_app/src/"
}
},
"support": {
"issues": "https://github.com/mixerapi/mixerapi-dev/issues",
"source": "https://github.com/mixerapi/exception-render"
Expand All @@ -25,5 +34,12 @@
"name": "MixerApi",
"role": "Organization"
}
]
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true,
"phpro/grumphp": true
}
}
}
20 changes: 18 additions & 2 deletions plugins/hal-view/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@
"cakephp/cakephp": "^4.2",
"mixerapi/core": "^1.0"
},
"require-dev": {
"josegonzalez/dotenv": "^3.2",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
"MixerApi\\HalView\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MixerApi\\HalView\\": "plugins/hal-view/src/",
"MixerApi\\HalView\\Test\\": "plugins/hal-view/tests/",
"MixerApi\\HalView\\Test\\App\\": "plugins/hal-view/tests/test_app/src/"
}
},
"support": {
"issues": "https://github.com/mixerapi/mixerapi-dev/issues",
"source": "https://github.com/mixerapi/hal-view"
Expand All @@ -24,6 +35,11 @@
"role": "Organization"
}
],
"prefer-stable": true,
"minimum-stability": "dev"
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true,
"phpro/grumphp": true
}
}
}
21 changes: 19 additions & 2 deletions plugins/json-ld-view/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@
"cakephp/cakephp": "^4.2",
"mixerapi/core": "^1.0"
},
"require-dev": {
"josegonzalez/dotenv": "^3.2",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
"MixerApi\\JsonLdView\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MixerApi\\JsonLdView\\": "plugins/json-ld-view/src/",
"MixerApi\\JsonLdView\\Test\\": "plugins/json-ld-view/tests/",
"MixerApi\\JsonLdView\\Test\\App\\": "plugins/json-ld-view/tests/test_app/src/"
}
},
"support": {
"issues": "https://github.com/mixerapi/mixerapi-dev/issues",
"source": "https://github.com/mixerapi/json-ld-view"
},
"authors": [
Expand All @@ -23,6 +35,11 @@
"role": "Organization"
}
],
"prefer-stable": true,
"minimum-stability": "dev"
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true,
"phpro/grumphp": true
}
}
}

0 comments on commit 38b2887

Please sign in to comment.