-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove scripts support because of cakephp 4.5 (#20)
Fix for cakephp 4.5 by removing support for scripts.
- Loading branch information
1 parent
5383908
commit ef6d334
Showing
7 changed files
with
92 additions
and
47 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
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,15 +4,41 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
run: | ||
|
||
test_and_analyze: | ||
name: PHP ${{ matrix.php-versions }} Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-20.04 ] | ||
php-versions: ['7.4', '8.0', '8.1'] | ||
php-versions: ['7.4', '8.0', '8.1', '8.2'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, intl, curl | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer validate | ||
composer install --prefer-dist --no-progress | ||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | ||
- name: Test Suite + Static Analysis | ||
run: composer test | ||
|
||
coverage: | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-20.04 ] | ||
php-versions: ['7.4'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -21,7 +47,7 @@ jobs: | |
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, intl, xdebug | ||
extensions: mbstring, intl, xdebug, curl | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
@@ -32,27 +58,20 @@ jobs: | |
composer validate | ||
composer install --prefer-dist --no-progress --no-suggest | ||
- name: Test (8.0) | ||
if: ${{ matrix.php-versions != '7.4' }} | ||
run: vendor/bin/phpunit | ||
|
||
- name: Test + Coverage + Static Analysis (7.4 only) | ||
if: ${{ matrix.php-versions == '7.4' }} | ||
- name: Code Coverage | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer check | ||
echo ${{ matrix.php-versions }} | ||
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=clover.xml | ||
vendor/bin/php-coveralls --coverage_clover=clover.xml -v | ||
# | ||
# CakePHP version compatability | ||
# | ||
composer global require php-coveralls/php-coveralls | ||
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=clover.xml | ||
php-coveralls --coverage_clover=clover.xml -v | ||
compatibility: | ||
name: CakePHP ${{ matrix.version }} Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
version: ['~4.2.0', '^4.3'] | ||
version: ['~4.2.0', '~4.3.0', '~4.4.0', '^4.5'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -61,7 +80,7 @@ jobs: | |
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, intl | ||
extensions: mbstring, intl, curl | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
@@ -73,10 +92,31 @@ jobs: | |
composer require cakephp/cakephp:${{matrix.version}} --no-update | ||
composer install --prefer-dist --no-progress | ||
composer test | ||
# | ||
# Verify we can run php with opcache preload | ||
# | ||
docker: | ||
integration_test_cake_43: | ||
name: Integration Test CakePHP ~4.3.0 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Get branch name | ||
id: branch-name | ||
uses: tj-actions/[email protected] | ||
- name: Docker Build | ||
run: docker build -t cakepreloader:test tests/ --no-cache --build-arg CAKE_VERSION=~4.3.0 --build-arg BRANCH=dev-${{ steps.branch-name.outputs.current_branch }} | ||
- name: Docker Run | ||
run: docker run -d cakepreloader:test | ||
- name: Test Container | ||
run: | | ||
if docker ps | grep "cakepreloader:test"; then | ||
echo "container is running" | ||
else | ||
echo "container is not running" | ||
exit 1 | ||
fi | ||
integration_test_cake_45: | ||
name: Integration Test CakePHP ^4.5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
|
@@ -85,7 +125,7 @@ jobs: | |
id: branch-name | ||
uses: tj-actions/[email protected] | ||
- name: Docker Build | ||
run: docker build -t cakepreloader:test tests/ --no-cache --build-arg BRANCH=dev-${{ steps.branch-name.outputs.current_branch }} | ||
run: docker build -t cakepreloader:test tests/ --no-cache --build-arg CAKE_VERSION=^4.5 --build-arg BRANCH=dev-${{ steps.branch-name.outputs.current_branch }} | ||
- name: Docker Run | ||
run: docker run -d cakepreloader:test | ||
- name: Test Container | ||
|
@@ -94,6 +134,6 @@ jobs: | |
echo "container is running" | ||
else | ||
echo "container is not running" | ||
docker run cakepreloader:test && exit 1 | ||
exit 1 | ||
fi | ||
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